From 626f85ae5e9d3aea2d528cbf847aee6ec6051407 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 9 Dec 2009 16:45:35 +0000 Subject: Move findCompatibleFormat from graphics/pixelformat.h to engines/engine.cpp This function is used in only one place. Declaring it requires common/list.h; by putting it into pixelformat.h, which is included by common/system.h, tons of things suddenly included list.h for no good reason. If we ever need to call this function in other places, we can figure out aborts more appropriate place for it. svn-id: r46310 --- graphics/pixelformat.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'graphics/pixelformat.h') diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 1822370fcd..7b95eabd35 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -27,7 +27,6 @@ #define GRAPHICS_PIXELFORMAT_H #include "common/scummsys.h" -#include "common/list.h" namespace Graphics { @@ -148,26 +147,6 @@ struct PixelFormat { } }; -/** - * Determines the first matching format between two lists. - * - * @param backend The higher priority list, meant to be a list of formats supported by the backend - * @param frontend The lower priority list, meant to be a list of formats supported by the engine - * @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) { -#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) { - if (*i == *j) - return *i; - } - } -#endif - return PixelFormat::createFormatCLUT8(); -} - } // End of namespace Graphics #endif -- cgit v1.2.3