PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

const correctness?

Is there a reason CGapiSurface can't be more const correct? Surely member functions like GetWidth and GetHeight can be const? And BltFast's parameter for source surface can be const?

Is this because it duplicates the DirectDraw API and it also isn't const correct?

This is an annoyance because I just encapsulated out CGapiSurface into a separate Image class in my codebase, and made it const because I never change images once loaded, and now I see these benign uses no longer compile.

Frustrating.
PocketFrog has always been const correct. I also wonder why this is not the case with GapiDraw.
I planned to change it but am holding off the interface change for GapiDraw 2.10. I have some minor SDK interface changes to do and this will be one of them.
Thanks!