gdsx: Prefix std:: to map

Also use auto when appropriate.
This commit is contained in:
Jonathan Li 2017-05-26 17:17:01 +01:00 committed by Gregory Hainaut
parent 2ff67f3741
commit 54c320c724
6 changed files with 10 additions and 11 deletions

View File

@ -516,7 +516,7 @@ CRC::Game CRC::m_games[] =
{0x4653CA3E, HarleyDavidson, NoRegion, 0}, {0x4653CA3E, HarleyDavidson, NoRegion, 0},
}; };
map<uint32, CRC::Game*> CRC::m_map; std::map<uint32, CRC::Game*> CRC::m_map;
std::string ToLower( std::string str ) std::string ToLower( std::string str )
{ {

View File

@ -209,7 +209,7 @@ public:
private: private:
static Game m_games[]; static Game m_games[];
static map<uint32, Game*> m_map; static std::map<uint32, Game*> m_map;
public: public:
static Game Lookup(uint32 crc); static Game Lookup(uint32 crc);

View File

@ -1006,7 +1006,7 @@ void GSRendererOGL::SendDraw()
#if defined(_DEBUG) #if defined(_DEBUG)
// Check how draw call is split. // Check how draw call is split.
map<size_t, size_t> frequency; std::map<size_t, size_t> frequency;
for (const auto& it: m_drawlist) for (const auto& it: m_drawlist)
++frequency[it]; ++frequency[it];

View File

@ -147,14 +147,13 @@ bool GSdxApp::WritePrivateProfileString(const char* lpAppName, const char* lpKey
if (f == NULL) return false; // FIXME print a nice message if (f == NULL) return false; // FIXME print a nice message
map<std::string,std::string>::iterator it; for (const auto& entry : m_configuration_map) {
for (it = m_configuration_map.begin(); it != m_configuration_map.end(); ++it) {
// Do not save the inifile key which is not an option // Do not save the inifile key which is not an option
if (it->first.compare("inifile") == 0) continue; if (entry.first.compare("inifile") == 0) continue;
// Only keep option that have a default value (allow to purge old option of the GSdx.ini) // Only keep option that have a default value (allow to purge old option of the GSdx.ini)
if (!it->second.empty() && m_default_configuration.find(it->first) != m_default_configuration.end()) if (!entry.second.empty() && m_default_configuration.find(entry.first) != m_default_configuration.end())
fprintf(f, "%s = %s\n", it->first.c_str(), it->second.c_str()); fprintf(f, "%s = %s\n", entry.first.c_str(), entry.second.c_str());
} }
fclose(f); fclose(f);

View File

@ -25,7 +25,7 @@
#ifdef _WIN32 #ifdef _WIN32
map<HWND, GPURenderer*> GPURenderer::m_wnd2gpu; std::map<HWND, GPURenderer*> GPURenderer::m_wnd2gpu;
#endif #endif
@ -231,7 +231,7 @@ bool GPURenderer::MakeSnapshot(const std::string& path)
LRESULT CALLBACK GPURenderer::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK GPURenderer::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
map<HWND, GPURenderer*>::iterator i = m_wnd2gpu.find(hWnd); auto i = m_wnd2gpu.find(hWnd);
if(i != m_wnd2gpu.end()) if(i != m_wnd2gpu.end())
{ {

View File

@ -50,7 +50,7 @@ protected:
HWND m_hWnd; HWND m_hWnd;
WNDPROC m_wndproc; WNDPROC m_wndproc;
static map<HWND, GPURenderer*> m_wnd2gpu; static std::map<HWND, GPURenderer*> m_wnd2gpu;
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);