Upgrade to MSVC 11. Fix pool_allocator a bit.
authorJohn Kessenich <cepheus@frii.com>
Fri, 8 Mar 2013 06:51:50 +0000 (06:51 +0000)
committerJohn Kessenich <cepheus@frii.com>
Fri, 8 Mar 2013 06:51:50 +0000 (06:51 +0000)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20811 e7fa87d3-cd2b-0410-9028-fcbf551c1848

StandAlone.vcxproj
glslang.vcxproj
glslang/Include/PoolAlloc.h

index 2510125..0e2cb87 100644 (file)
     <ConfigurationType>Application</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v110</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>Application</ConfigurationType>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v110</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index 85b12fb..34b2f93 100644 (file)
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <UseOfMfc>false</UseOfMfc>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v110</PlatformToolset>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
     <ConfigurationType>StaticLibrary</ConfigurationType>\r
     <CharacterSet>MultiByte</CharacterSet>\r
+    <PlatformToolset>v110</PlatformToolset>\r
   </PropertyGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
   <ImportGroup Label="ExtensionSettings">\r
index d40a6f5..3cacba3 100644 (file)
@@ -283,37 +283,13 @@ public:
     pointer address(reference x) const { return &x; }
     const_pointer address(const_reference x) const { return &x; }
 
-#ifdef USING_SGI_STL
-       pool_allocator()  { }
-#else
     pool_allocator() : allocator(GlobalPoolAllocator) { }
     pool_allocator(TPoolAllocator& a) : allocator(a) { }
     pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { }
-#endif
 
-#if defined(_MSC_VER) && _MSC_VER >= 1300
     template<class Other>
-#ifdef USING_SGI_STL
-        pool_allocator(const pool_allocator<Other>& p) /*: allocator(p.getAllocator())*/ { }
-#else
         pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
-#endif
-#endif
 
-#ifndef _WIN32
-        template<class Other>
-            pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
-#endif
-
-#ifdef USING_SGI_STL
-    static pointer allocate(size_type n) { 
-        return reinterpret_cast<pointer>(getAllocator().allocate(n)); }
-    pointer allocate(size_type n, const void*) { 
-        return reinterpret_cast<pointer>(getAllocator().allocate(n)); }
-
-       static void deallocate(void*, size_type) { }
-    static void deallocate(pointer, size_type) { }
-#else
     pointer allocate(size_type n) { 
         return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T))); }
     pointer allocate(size_type n, const void*) { 
@@ -321,7 +297,6 @@ public:
 
        void deallocate(void*, size_type) { }
     void deallocate(pointer, size_type) { }
-#endif
 
        pointer _Charalloc(size_t n) {
         return reinterpret_cast<pointer>(getAllocator().allocate(n)); }
@@ -335,16 +310,12 @@ public:
     size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
     size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
 
-#ifdef USING_SGI_STL
-    //void setAllocator(TPoolAllocator* a) { allocator = a; }
-    static  TPoolAllocator& getAllocator() { return GlobalPoolAllocator; }
-#else
     void setAllocator(TPoolAllocator* a) { allocator = *a; }
     TPoolAllocator& getAllocator() const { return allocator; }
 
 protected:
+    pool_allocator& operator=(const pool_allocator& rhs) { return *this; }
     TPoolAllocator& allocator;
-#endif
 };
 
 #endif // _POOLALLOC_INCLUDED_