[Scummvm-git-logs] scummvm master -> 8b8fd13d566aff2c212a6114e7ac472c3b19f9af

sev- sev at scummvm.org
Sun Mar 5 00:56:35 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8b8fd13d56 BACKENDS: Fix const'ness which led to warnings


Commit: 8b8fd13d566aff2c212a6114e7ac472c3b19f9af
    https://github.com/scummvm/scummvm/commit/8b8fd13d566aff2c212a6114e7ac472c3b19f9af
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-03-05T00:56:27+01:00

Commit Message:
BACKENDS: Fix const'ness which led to warnings

Changed paths:
    backends/graphics/graphics.h
    backends/graphics/surfacesdl/surfacesdl-graphics.cpp
    backends/graphics/surfacesdl/surfacesdl-graphics.h
    common/system.h


diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index f6b0058..35f2fa1 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -46,13 +46,13 @@ public:
 	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;
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 2b31e90..692602b 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -706,7 +706,7 @@ const OSystem::GraphicsMode *SurfaceSdlGraphicsManager::getSupportedShaders() co
 	return s_supportedShaders;
 }
 
-int SurfaceSdlGraphicsManager::getShader() {
+int SurfaceSdlGraphicsManager::getShader() const {
 	return _currentShader;
 }
 
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index ef41b90..fa130cd 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -106,7 +106,7 @@ public:
 	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; }
diff --git a/common/system.h b/common/system.h
index 68d33b7..32f20da 100644
--- a/common/system.h
+++ b/common/system.h
@@ -254,7 +254,7 @@ public:
 		 *       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 @@ public:
 		 * 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 @@ public:
 	 * @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 @@ public:
 	 * 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:





More information about the Scummvm-git-logs mailing list