Skip to content
Permalink
Browse files

BACKENDS: Fix const'ness which led to warnings

  • Loading branch information
sev- committed Mar 4, 2017
1 parent 6ce06d2 commit 8b8fd13d566aff2c212a6114e7ac472c3b19f9af
@@ -46,13 +46,13 @@ class GraphicsManager : public PaletteManager {
virtual bool setGraphicsMode(int mode) = 0;
virtual void resetGraphicsScale() = 0;
virtual int getGraphicsMode() const = 0;
virtual const OSystem::GraphicsMode *getSupportedShaders() const {
static const OSystem::GraphicsMode no_shader[2] = {{"NONE", "Normal (no shader)", 0}, {0, 0, 0}};
virtual const OSystem::GraphicsMode *getSupportedShaders() const {
static const OSystem::GraphicsMode no_shader[2] = {{"NONE", "Normal (no shader)", 0}, {0, 0, 0}};
return no_shader;
};
virtual bool setShader(int id) { return false; }
virtual int getShader() { return 0; }
virtual int getShader() const { return 0; }

#ifdef USE_RGB_COLOR
virtual Graphics::PixelFormat getScreenFormat() const = 0;
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0;
@@ -706,7 +706,7 @@ const OSystem::GraphicsMode *SurfaceSdlGraphicsManager::getSupportedShaders() co
return s_supportedShaders;
}

int SurfaceSdlGraphicsManager::getShader() {
int SurfaceSdlGraphicsManager::getShader() const {
return _currentShader;
}

@@ -106,7 +106,7 @@ class SurfaceSdlGraphicsManager : public SdlGraphicsManager, public Common::Even
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;
#endif
virtual const OSystem::GraphicsMode *getSupportedShaders() const;
virtual int getShader();
virtual int getShader() const;
virtual bool setShader(int id);
virtual void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL);
virtual int getScreenChangeID() const { return _screenChangeCount; }
@@ -254,7 +254,7 @@ class OSystem : Common::NonCopyable {
* particular, interpolation, and works in-place.
*/
kFeatureAspectRatioCorrection,

/**
* If supported this flag can be used to switch between unfiltered and
* filtered graphics modes.
@@ -337,17 +337,17 @@ class OSystem : Common::NonCopyable {
* This feature has no associated state.
*/
kFeatureOpenUrl ,

/**
* show on-screen control
*/
kFeatureOnScreenControl,

/**
* mouse emulation mode
*/
kFeatureTouchpadMode,

/**
* swap menu and back buttons
*/
@@ -586,7 +586,7 @@ class OSystem : Common::NonCopyable {
* @return a list of supported shaders
*/
virtual const GraphicsMode *getSupportedShaders() const {
static const OSystem::GraphicsMode no_shader[2] = {{"NONE", "Normal (no shader)", 0}, {0, 0, 0}};
static const OSystem::GraphicsMode no_shader[2] = {{"NONE", "Normal (no shader)", 0}, {0, 0, 0}};
return no_shader;
}

@@ -603,7 +603,7 @@ class OSystem : Common::NonCopyable {
* Determine which shader is currently active.
* @return the ID of the active shader
*/
virtual int getShader() { return 0; }
virtual int getShader() const { return 0; }

/**
* Set the size and color format of the virtual screen. Typical sizes include:

0 comments on commit 8b8fd13

Please sign in to comment.
You can’t perform that action at this time.