From 24f5d456195df3b65ed2876cbca2e2981f3d1a07 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sun, 1 Oct 2017 01:05:10 -0500 Subject: 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. --- engines/engine.cpp | 11 ++++------- 1 file 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 backend, Common::List frontend) { +inline Graphics::PixelFormat findCompatibleFormat(const Common::List &backend, const Common::List &frontend) { #ifdef USE_RGB_COLOR - for (Common::List::iterator i = backend.begin(); i != backend.end(); ++i) { - for (Common::List::iterator j = frontend.begin(); j != frontend.end(); ++j) { + for (Common::List::const_iterator i = backend.begin(); i != backend.end(); ++i) { + for (Common::List::const_iterator j = frontend.begin(); j != frontend.end(); ++j) { if (*i == *j) return *i; } } #endif - return PixelFormat::createFormatCLUT8(); + return Graphics::PixelFormat::createFormatCLUT8(); } -- cgit v1.2.3