aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-10-01 01:05:10 -0500
committerColin Snover2017-10-07 12:30:29 -0500
commit24f5d456195df3b65ed2876cbca2e2981f3d1a07 (patch)
tree05fbf4354ca607b3c42f2c68f5095c7657c4e81f
parent9a82bc6d9677f283b26a0969d3dfa82372d82cec (diff)
downloadscummvm-rg350-24f5d456195df3b65ed2876cbca2e2981f3d1a07.tar.gz
scummvm-rg350-24f5d456195df3b65ed2876cbca2e2981f3d1a07.tar.bz2
scummvm-rg350-24f5d456195df3b65ed2876cbca2e2981f3d1a07.zip
ENGINES: Remove Graphics::PixelFormat alias from engine.cpp
Almost the entire file does not use the aliased PixelFormat except for a single function, so just make that function work like everything else already in the TU.
-rw-r--r--engines/engine.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index bb07f5f722..ae82692992 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -353,9 +353,6 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) {
}
}
-
-using Graphics::PixelFormat;
-
/**
* Determines the first matching format between two lists.
*
@@ -364,16 +361,16 @@ using Graphics::PixelFormat;
* @return The first item on the backend list that also occurs on the frontend list
* or PixelFormat::createFormatCLUT8() if no matching formats were found.
*/
-inline PixelFormat findCompatibleFormat(Common::List<PixelFormat> backend, Common::List<PixelFormat> frontend) {
+inline Graphics::PixelFormat findCompatibleFormat(const Common::List<Graphics::PixelFormat> &backend, const Common::List<Graphics::PixelFormat> &frontend) {
#ifdef USE_RGB_COLOR
- for (Common::List<PixelFormat>::iterator i = backend.begin(); i != backend.end(); ++i) {
- for (Common::List<PixelFormat>::iterator j = frontend.begin(); j != frontend.end(); ++j) {
+ for (Common::List<Graphics::PixelFormat>::const_iterator i = backend.begin(); i != backend.end(); ++i) {
+ for (Common::List<Graphics::PixelFormat>::const_iterator j = frontend.begin(); j != frontend.end(); ++j) {
if (*i == *j)
return *i;
}
}
#endif
- return PixelFormat::createFormatCLUT8();
+ return Graphics::PixelFormat::createFormatCLUT8();
}