summaryrefslogtreecommitdiff
path: root/indra/llcommon/llhash.h
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2008-12-01 16:34:31 +0000
committerAndrew Meadows <andrew@lindenlab.com>2008-12-01 16:34:31 +0000
commitde7d6cf4dfa1db2945e3ed4a3e8257d72674a496 (patch)
treecc379363bd62d7ff6e8bad34f5f588436ca6e799 /indra/llcommon/llhash.h
parent64cb981d12bf5f1af20aa124c1d645111da96cf0 (diff)
svn merge -r103586:104391 svn+ssh://svn.lindenlab.com/svn/linden/qa/maint-server/maint-server-4-sandbox-r103546
Picking up the following bug fixes: DEV-19747 Flooding sim with bogus animation packets crashes sim DEV-20978 Investigate baked avatar texture caching in simulator - ids not properly stored DEV-5316 llsd-get .../runtime/top and "World:Region/Estate:Debug:Get Top Scripts" broken DEV-18807 SVC-2596: Script dataserver events become permanently blocked until sim restart DEV-19108 SVC-2616: Torus refuses to accept 180 degree texture rotation DEV-9944 Simulator crash failing to write simstate to file .tmp.tmp DEV-21439 Configure VFS file size via simulator.xml
Diffstat (limited to 'indra/llcommon/llhash.h')
-rw-r--r--indra/llcommon/llhash.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/llcommon/llhash.h b/indra/llcommon/llhash.h
index 08299f5ddc..ee327be8c9 100644
--- a/indra/llcommon/llhash.h
+++ b/indra/llcommon/llhash.h
@@ -53,15 +53,20 @@
#error Please define your platform.
#endif
-template<class T> inline size_t llhash(T value)
-{
+// Warning - an earlier template-based version of this routine did not do
+// the correct thing on Windows. Since this is only used to get
+// a string hash, it was converted to a regular routine and
+// unit tests added.
+
+inline size_t llhash( const char * value )
+{
#if LL_WINDOWS
- return stdext::hash_value<T>(value);
+ return stdext::hash_value(value);
#elif ( (defined _STLPORT_VERSION) || ((LL_LINUX) && (__GNUC__ <= 2)) )
- std::hash<T> H;
+ std::hash<const char *> H;
return H(value);
#elif LL_DARWIN || LL_LINUX || LL_SOLARIS
- __gnu_cxx::hash<T> H;
+ __gnu_cxx::hash<const char *> H;
return H(value);
#else
#error Please define your platform.