mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 01:27:55 +08:00
80 lines
2.6 KiB
Diff
80 lines
2.6 KiB
Diff
|
diff --git a/OgreMain/include/OgreString.h b/OgreMain/include/OgreString.h
|
||
|
index 8693c57..720a243 100644
|
||
|
--- a/OgreMain/include/OgreString.h
|
||
|
+++ b/OgreMain/include/OgreString.h
|
||
|
@@ -34,44 +34,6 @@ THE SOFTWARE.
|
||
|
|
||
|
#include "OgreHeaderPrefix.h"
|
||
|
|
||
|
-// If we're using the GCC 3.1 C++ Std lib
|
||
|
-#if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
|
||
|
-
|
||
|
-// For gcc 4.3 see http://gcc.gnu.org/gcc-4.3/changes.html
|
||
|
-# if __cplusplus >= 201103L
|
||
|
-# include <unordered_map>
|
||
|
-# elif OGRE_COMP_VER >= 430
|
||
|
-# include <tr1/unordered_map>
|
||
|
-# else
|
||
|
-# include <ext/hash_map>
|
||
|
-namespace __gnu_cxx
|
||
|
-{
|
||
|
- template <> struct hash< Ogre::_StringBase >
|
||
|
- {
|
||
|
- size_t operator()( const Ogre::_StringBase _stringBase ) const
|
||
|
- {
|
||
|
- /* This is the PRO-STL way, but it seems to cause problems with VC7.1
|
||
|
- and in some other cases (although I can't recreate it)
|
||
|
- hash<const char*> H;
|
||
|
- return H(_stringBase.c_str());
|
||
|
- */
|
||
|
- /** This is our custom way */
|
||
|
- register size_t ret = 0;
|
||
|
- for( Ogre::_StringBase::const_iterator it = _stringBase.begin(); it != _stringBase.end(); ++it )
|
||
|
- ret = 5 * ret + *it;
|
||
|
-
|
||
|
- return ret;
|
||
|
- }
|
||
|
- };
|
||
|
-}
|
||
|
-# endif
|
||
|
-
|
||
|
-#endif
|
||
|
-
|
||
|
-#if OGRE_COMPILER == OGRE_COMPILER_MSVC
|
||
|
- #include <xhash>
|
||
|
-#endif
|
||
|
-
|
||
|
namespace Ogre {
|
||
|
/** \addtogroup Core
|
||
|
* @{
|
||
|
@@ -205,28 +167,8 @@ namespace Ogre {
|
||
|
static const String replaceAll(const String& source, const String& replaceWhat, const String& replaceWithWhat);
|
||
|
};
|
||
|
|
||
|
+ typedef ::std::hash<_StringBase> _StringHash;
|
||
|
|
||
|
-#if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 310 && !defined(STLPORT)
|
||
|
-# if __cplusplus >= 201103L
|
||
|
- typedef std::hash< _StringBase > _StringHash;
|
||
|
-# elif OGRE_COMP_VER < 430
|
||
|
- typedef ::__gnu_cxx::hash< _StringBase > _StringHash;
|
||
|
-# else
|
||
|
- typedef ::std::tr1::hash< _StringBase > _StringHash;
|
||
|
-# endif
|
||
|
-#elif OGRE_COMPILER == OGRE_COMPILER_CLANG
|
||
|
-# if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
|
||
|
- typedef ::std::hash< _StringBase > _StringHash;
|
||
|
-# else
|
||
|
- typedef ::std::tr1::hash< _StringBase > _StringHash;
|
||
|
-# endif
|
||
|
-#elif OGRE_COMPILER == OGRE_COMPILER_MSVC && OGRE_COMP_VER >= 1600 && OGRE_COMP_VER < 1910 && !defined(STLPORT) // VC++ 10.0
|
||
|
- typedef ::std::tr1::hash< _StringBase > _StringHash;
|
||
|
-#elif !defined( _STLP_HASH_FUN_H )
|
||
|
- typedef stdext::hash_compare< _StringBase, std::less< _StringBase > > _StringHash;
|
||
|
-#else
|
||
|
- typedef std::hash< _StringBase > _StringHash;
|
||
|
-#endif
|
||
|
/** @} */
|
||
|
/** @} */
|
||
|
|