Commits

gyulalaszlo committed f9c8278

modified hash_extensions to compile on GCC. Need to be checked on VS for compiance.

Comments (0)

Files changed (1)

         template <typename T>
         inline void deallocate_values( Hash<T>& hsh, Allocator& allocator )
         {
-            for (const Hash<T>::Entry* it = hash::begin( hsh );
+            for (const typename Hash<T>::Entry* it = hash::begin( hsh );
                 it != hash::end( hsh ); ++it )
             {
                 allocator.deallocate( it->value );
         template <typename T>
         inline void destroy_objects( Hash<T*>& hsh, Allocator& allocator )
         {
-            for (const Hash<T*>::Entry* it = hash::begin( hsh );
+            for (const typename Hash<T*>::Entry* it = hash::begin( hsh );
                 it != hash::end( hsh ); ++it )
             {
-                MAKE_DELETE( allocator, typename T, it->value );
+                // MSVC seems to require some "typename" here, GCC doesnt
+                // MAKE_DELETE( allocator, typename T, it->value );
+                MAKE_DELETE( allocator, T, it->value );
             }
         }
 
         template <typename KeyType, typename T, typename Data>
         inline void extract_from( Hash<T>& hsh, Data* start, const int data_size, const uint32_t key_offset, const uint32_t data_offset)
         {
-            extract_from<typename KeyType>( hsh, start, start + data_size, key_offset, data_offset );
+            extract_from<KeyType>( hsh, start, start + data_size, key_offset, data_offset );
         }
 
         //////////////////////////////////////////////////////////////////////////
             collect_from<KeyType>( hsh, start, start + data_size, key_offset );
         }
     }
-}
+}