diff options
author | Jonathan Goodman <geenz@geenzo.com> | 2012-08-29 08:02:46 -0400 |
---|---|---|
committer | Jonathan Goodman <geenz@geenzo.com> | 2012-08-29 08:02:46 -0400 |
commit | d5b45b0b636557333c3408e7a60d5ef587ea99ad (patch) | |
tree | 05e4b0a55836c45d0a338a6928d846a3869a1313 /indra/llrender/llshadermgr.cpp | |
parent | e606677ed885c4e9189b0768b5e6f999fa2cf885 (diff) |
Use an unordered map for custom #defines instead of a map. Lookups are faster, and we don't really care about any particular order anyways for these.
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 4f7f845c70..3b1ec281c9 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -521,7 +521,7 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns) } } -GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, std::map<std::string, std::string> defines, S32 texture_index_channels) +GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, boost::unordered_map<std::string, std::string> defines, S32 texture_index_channels) { GLenum error = GL_NO_ERROR; if (gDebugGL) @@ -658,7 +658,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade text[count++] = (GLcharARB *) strdup(define.c_str()); } - for (std::map<std::string,std::string>::iterator iter = defines.begin(); iter != defines.end(); ++iter) + for (boost::unordered_map<std::string,std::string>::iterator iter = defines.begin(); iter != defines.end(); ++iter) { std::string define = "#define " + iter->first + " " + iter->second + "\n"; text[count++] = (GLcharARB *) strdup(define.c_str()); |