From bf688510a8f0fbf1d1401806d5137e64c8e94cc0 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 21 Oct 2013 19:50:14 +0000 Subject: [PATCH] For portability, use std::map instead of std::hash_map in recent preprocessor fix. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23632 e7fa87d3-cd2b-0410-9028-fcbf551c1848 --- glslang/MachineIndependent/preprocessor/PpContext.h | 8 +++----- glslang/MachineIndependent/preprocessor/PpSymbols.cpp | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h index 4d267151e..b19d81410 100644 --- a/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/glslang/MachineIndependent/preprocessor/PpContext.h @@ -80,8 +80,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../ParseHelper.h" -#include - namespace glslang { class TPpToken { @@ -165,8 +163,8 @@ public: }; MemoryPool *pool; - typedef std::hash_map TSymbol; - TSymbol symbols; // this has light use... just defined macros + typedef std::map TSymbolMap; + TSymbolMap symbols; // this has light use... just defined macros protected: char* preamble; // string to parse, all before line 1 of string 0, it is 0 if no preamble @@ -304,7 +302,7 @@ protected: // // From PpAtom.cpp // - typedef std::hash_map TAtomMap; + typedef std::map TAtomMap; typedef TVector TStringMap; TAtomMap atomMap; TStringMap stringMap; diff --git a/glslang/MachineIndependent/preprocessor/PpSymbols.cpp b/glslang/MachineIndependent/preprocessor/PpSymbols.cpp index 076b346dc..590c186e3 100644 --- a/glslang/MachineIndependent/preprocessor/PpSymbols.cpp +++ b/glslang/MachineIndependent/preprocessor/PpSymbols.cpp @@ -125,7 +125,7 @@ TPpContext::Symbol* TPpContext::AddSymbol(int atom) TPpContext::Symbol* TPpContext::LookUpSymbol(int atom) { - TSymbol::iterator it = symbols.find(atom); + TSymbolMap::iterator it = symbols.find(atom); if (it == symbols.end()) return 0; else