From 09ce67303e6e117ec60ec3a0839c9dffb380f826 Mon Sep 17 00:00:00 2001 From: Calefaction Date: Sun, 24 Oct 2004 00:48:54 +0000 Subject: [PATCH] Updates to fix VC2K5 compile problem This was SVN commit r1276. --- source/graphics/ProgramManager.cpp | 2 +- source/graphics/ProgramManager.h | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/source/graphics/ProgramManager.cpp b/source/graphics/ProgramManager.cpp index a52cf0caa5..132c3ff3ff 100755 --- a/source/graphics/ProgramManager.cpp +++ b/source/graphics/ProgramManager.cpp @@ -21,7 +21,7 @@ CProgramManager::~CProgramManager() CVertexProgram *CProgramManager::FindVertexProgram(const char *file) { CVertexProgram *prog = NULL; - std::hash_map::iterator iter; + pp_map::iterator iter; if((iter = m_VertexProgs.find(std::string(file))) != m_VertexProgs.end()) return (CVertexProgram *)(*iter).second; diff --git a/source/graphics/ProgramManager.h b/source/graphics/ProgramManager.h index 703cc1efc2..1f5f9c8bc7 100755 --- a/source/graphics/ProgramManager.h +++ b/source/graphics/ProgramManager.h @@ -1,17 +1,18 @@ -#ifndef __H_SHADERMANAGER_H__ -#define __H_SHADERMANAGER_H__ - -#if _MSC_VER < 1300 -# include -# define hash_map map -#else -# include -#endif +#ifndef __H_PROGRAMMANAGER_H__ +#define __H_PROGRAMMANAGER_H__ #include #include "Singleton.h" #include "renderer/VertexProgram.h" +#if (_MSC_VER < 1300) || (_MSC_VER > 1310) +# include +typedef std::map pp_map; +#else +# include +typedef std::hash_map pp_map; +#endif + #define g_ProgramManager CProgramManager::GetSingleton() @@ -32,7 +33,7 @@ private: #ifdef BUILD_CG void FindPPVersion(); #endif - std::hash_map m_VertexProgs; + pp_map m_VertexProgs; #ifdef BUILD_CG CGcontext m_Context; CGprofile m_VPProfile;