Index: trunk/nv/base/capi.hh
===================================================================
--- trunk/nv/base/capi.hh	(revision 532)
+++ trunk/nv/base/capi.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
Index: trunk/nv/base/common.hh
===================================================================
--- trunk/nv/base/common.hh	(revision 532)
+++ trunk/nv/base/common.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -162,5 +162,5 @@
 #endif
 
-#define NV_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / (static_cast<nv::size_t>(!(sizeof(x) % sizeof(0[x])))))
+#define NV_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / (static_cast<nv::uint32>(!(sizeof(x) % sizeof(0[x])))))
 #define NV_SAFE_ARRAY( arr, idx, def ) ( index < NV_COUNT_OF(arr) ? (arr)[idx] : (def) )
 
@@ -292,5 +292,5 @@
 	};
 
-	using log_handler_t = void( *)( int, const char*, size_t );
+	using log_handler_t = void( *)( int, const char*, uint32 );
 
 	log_handler_t get_log_handler();
@@ -298,11 +298,11 @@
 
 	template < typename T >
-	constexpr size_t size( const T& t )
+	constexpr uint32 size( const T& t )
 	{
 		return t.size();
 	}
 
-	template < typename T, size_t N >
-	constexpr size_t size( const T (&)[N] )
+	template < typename T, uint32 N >
+	constexpr uint32 size( const T (&)[N] )
 	{
 		return N;
@@ -315,5 +315,5 @@
 	}
 
-	template < typename T, size_t N >
+	template < typename T, uint32 N >
 	constexpr bool empty( const T(&)[N] )
 	{
@@ -333,5 +333,5 @@
 	}
 
-	template < typename T, size_t N >
+	template < typename T, uint32 N >
 	constexpr T* data( T(&array)[N] )
 	{
Index: trunk/nv/common.hh
===================================================================
--- trunk/nv/common.hh	(revision 532)
+++ trunk/nv/common.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
Index: trunk/nv/core/logger.hh
===================================================================
--- trunk/nv/core/logger.hh	(revision 532)
+++ trunk/nv/core/logger.hh	(revision 533)
@@ -43,5 +43,5 @@
 		* Optional timestamp string
 		*/
-		size_t timestamp( char* buffer ) const;
+		uint32 timestamp( char* buffer ) const;
 		/**
 		* Log level name (unpadded)
Index: trunk/nv/core/logging.hh
===================================================================
--- trunk/nv/core/logging.hh	(revision 532)
+++ trunk/nv/core/logging.hh	(revision 533)
@@ -40,5 +40,5 @@
 		void log_append( string_view ref )
 		{
-			size_t count = ::nv::min< size_t >( ref.size(), space_left()-1 );
+			uint32 count = ::nv::min< uint32 >( ref.size(), space_left()-1 );
 			nvmemcpy( m_pos, ref.data(), count );
 			m_pos += count;
@@ -72,5 +72,5 @@
 		{
 			*m_pos = '\0';
-			log( level, string_view( m_message, static_cast<size_t>( m_pos - m_message ) ) );
+			log( level, string_view( m_message, static_cast<uint32>( m_pos - m_message ) ) );
 			m_pos = m_message;
 		}
@@ -83,7 +83,7 @@
 		virtual ~logger_base() {}
 	protected:
-		inline size_t space_left() const
+		inline uint32 space_left() const
 		{
-			return 1024 - static_cast< size_t >( m_pos - m_message );
+			return 1024 - static_cast< uint32 >( m_pos - m_message );
 		}
 
Index: trunk/nv/core/types.hh
===================================================================
--- trunk/nv/core/types.hh	(revision 532)
+++ trunk/nv/core/types.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2014 Kornel Kisielewicz
+// Copyright (C) 2014-2017 Kornel Kisielewicz
 // http://chaosforge.org/
 //
@@ -96,5 +96,5 @@
 		constructor_t      constructor; //!< Pointers to the constructor 
 		destructor_t       destructor;  //!< Pointers to the destructor 
-		size_t             size;        //!< Result of sizeof(type) operation
+		uint32             size;        //!< Result of sizeof(type) operation
 		type_entry*        base_type;   //!< Base type
 		vector<type_field> field_list;  //!< Field list
Index: trunk/nv/engine/light.hh
===================================================================
--- trunk/nv/engine/light.hh	(revision 532)
+++ trunk/nv/engine/light.hh	(revision 533)
@@ -85,5 +85,5 @@
 			uint32 count = nv::min< uint32 >( lights.size(), m_max_size );
 			uint32 shadow_counter[4] = { 0, 0, 0, 0 };
-			for ( size_t i = 0; i < count; ++i )
+			for ( uint32 i = 0; i < count; ++i )
 			{
 				m_cameras[i].set_lookat( vec3(), vec3( lights[i]->direction ), vec3( 1.0f, 0.0f, 0.0f ) );
@@ -149,5 +149,5 @@
 		{
 			uint32 count = nv::min< uint32 >( lights.size(), m_max_size );
-			for ( size_t i = 0; i < count; ++i )
+			for ( uint32 i = 0; i < count; ++i )
 			{
 				vec3 nlp = lights[i]->position;
Index: trunk/nv/gfx/texture_atlas.hh
===================================================================
--- trunk/nv/gfx/texture_atlas.hh	(revision 532)
+++ trunk/nv/gfx/texture_atlas.hh	(revision 533)
@@ -21,14 +21,14 @@
 	{
 	public:
-		texture_atlas( ivec2 size, size_t depth, size_t border = 1 );
+		texture_atlas( ivec2 size, uint32 depth, uint32 border = 1 );
 		region get_region( ivec2 size );
 		void clear();
-		size_t get_used() const { return m_used; }
+		uint32 get_used() const { return m_used; }
 	protected:
-		int fit( size_t index, ivec2 size );
+		int fit( uint32 index, ivec2 size );
 		void merge();
 	private:
-		size_t m_used;
-		size_t m_border;
+		uint32 m_used;
+		uint32 m_border;
 		vector<ivec3> m_nodes;
 	};
Index: trunk/nv/interface/mesh_data.hh
===================================================================
--- trunk/nv/interface/mesh_data.hh	(revision 532)
+++ trunk/nv/interface/mesh_data.hh	(revision 533)
@@ -25,5 +25,5 @@
 	class child_list : noncopyable
 	{
-		static constexpr size_t MAX_CHILDREN = 7;
+		static constexpr uint32 MAX_CHILDREN = 7;
 	public:
 		child_list() : m_size( 0 )
@@ -74,8 +74,8 @@
 		}
 
-		size_t size() const { return m_data.size(); }
+		uint32 size() const { return m_data.size(); }
 		bool empty() const { return m_data.empty(); }
 
-		const data_node_info& operator[]( size_t i ) const
+		const data_node_info& operator[]( uint32 i ) const
 		{
 			return m_data[i];
@@ -85,5 +85,5 @@
 		{
 			if ( size() != other.size() ) return false;
-			for ( size_t i = 0; i < size(); ++i )
+			for ( uint32 i = 0; i < size(); ++i )
 				if ( m_data[i].name != other.m_data[i].name ) return false;
 			return true;
@@ -92,5 +92,5 @@
 		sint16 resolve( shash64 name ) const
 		{
-			for ( size_t i = 0; i < size(); ++i )
+			for ( uint32 i = 0; i < size(); ++i )
 				if ( m_data[i].name == name )
 					return sint16(i);
@@ -128,5 +128,5 @@
 		}
 
-		const child_list& children( size_t i ) const
+		const child_list& children( uint32 i ) const
 		{
 			return m_children[i];
@@ -166,13 +166,13 @@
 		}
 
-		const child_list& children( size_t i ) const
+		const child_list& children( uint32 i ) const
 		{
 			return m_info.children(i);
 		}
 
-		size_t size() const { return m_data.size(); }
+		uint32 size() const { return m_data.size(); }
 		bool empty() const { return m_data.empty(); }
 
-		bool is_animated( size_t i ) const
+		bool is_animated( uint32 i ) const
 		{
 			if ( i >= m_data.size() ) return false;
@@ -209,9 +209,9 @@
 		}
 
-		const data_channel_set* operator[]( size_t i ) const
+		const data_channel_set* operator[]( uint32 i ) const
 		{
 			return m_data[i];
 		}
-		const data_node_info& get_info( size_t i ) const
+		const data_node_info& get_info( uint32 i ) const
 		{
 			return m_info[i];
Index: trunk/nv/lib/curses.hh
===================================================================
--- trunk/nv/lib/curses.hh	(revision 532)
+++ trunk/nv/lib/curses.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2014-2015 ChaosForge Ltd
+// Copyright (C) 2014-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -14,5 +14,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_CURSES_PATH "pdcurses.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_CURSES_PATH "pdcurses64.dll"
+#	else
+#		define NV_CURSES_PATH "pdcurses.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_CURSES_PATH ""
Index: trunk/nv/lib/fmod.hh
===================================================================
--- trunk/nv/lib/fmod.hh	(revision 532)
+++ trunk/nv/lib/fmod.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -14,5 +14,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_FMOD_PATH "fmodex.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_FMOD_PATH "fmodex64.dll"
+#	else
+#		define NV_FMOD_PATH "fmodex.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_FMOD_PATH "fmodex.framework/fmodex"
Index: trunk/nv/lib/freetype2.hh
===================================================================
--- trunk/nv/lib/freetype2.hh	(revision 532)
+++ trunk/nv/lib/freetype2.hh	(revision 533)
@@ -18,5 +18,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_FREETYPE_PATH "freetype6.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_FREETYPE_PATH "freetype6_64.dll"
+#	else
+#		define NV_FREETYPE_PATH "freetype6.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_FREETYPE_PATH "freetype.framework/freetype"
Index: trunk/nv/lib/gl.hh
===================================================================
--- trunk/nv/lib/gl.hh	(revision 532)
+++ trunk/nv/lib/gl.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
Index: trunk/nv/lib/lua.hh
===================================================================
--- trunk/nv/lib/lua.hh	(revision 532)
+++ trunk/nv/lib/lua.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -46,7 +46,13 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_LUA_PATH_51  "lua51.dll"
-#	define NV_LUA_PATH_52  "lua52.dll"
-#	define NV_LUA_PATH_JIT "luajit.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_LUA_PATH_51  "lua51_64.dll"
+#		define NV_LUA_PATH_52  "lua52_64.dll"
+#		define NV_LUA_PATH_JIT "luajit_64.dll"
+#	else
+#		define NV_LUA_PATH_51  "lua51.dll"
+#		define NV_LUA_PATH_52  "lua52.dll"
+#		define NV_LUA_PATH_JIT "luajit.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_LUA_PATH_51  "lua5.1.dylib"
Index: trunk/nv/lib/sdl.hh
===================================================================
--- trunk/nv/lib/sdl.hh	(revision 532)
+++ trunk/nv/lib/sdl.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -14,5 +14,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_SDL_PATH "SDL2.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_SDL_PATH "SDL2_64.dll"
+#	else
+#		define NV_SDL_PATH "SDL2.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_SDL_PATH "SDL2.framework/SDL"
Index: trunk/nv/lib/sdl_image.hh
===================================================================
--- trunk/nv/lib/sdl_image.hh	(revision 532)
+++ trunk/nv/lib/sdl_image.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -12,5 +12,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_SDL_IMAGE_PATH "SDL2_image.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_SDL_IMAGE_PATH "SDL2_image_64.dll"
+#	else
+#		define NV_SDL_IMAGE_PATH "SDL2_image.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_SDL_IMAGE_PATH "SDL2_image.framework/SDL_image"
Index: trunk/nv/lib/sdl_mixer.hh
===================================================================
--- trunk/nv/lib/sdl_mixer.hh	(revision 532)
+++ trunk/nv/lib/sdl_mixer.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -12,5 +12,9 @@
 
 #if NV_PLATFORM == NV_WINDOWS
-#	define NV_SDL_MIXER_PATH "SDL2_mixer.dll"
+#	if NV_ARCHITECTURE == NV_64BIT
+#		define NV_SDL_MIXER_PATH "SDL2_mixer_64.dll"
+#	else 
+#		define NV_SDL_MIXER_PATH "SDL2_mixer.dll"
+#	endif
 #elif NV_PLATFORM == NV_APPLE
 #	define NV_SDL_MIXER_PATH "SDL2_mixer.framework/SDL_mixer"
Index: trunk/nv/lua/lua_raw.hh
===================================================================
--- trunk/nv/lua/lua_raw.hh	(revision 532)
+++ trunk/nv/lua/lua_raw.hh	(revision 533)
@@ -37,5 +37,5 @@
 	size_t len;
 	const char* str = lua_tolstring( L, idx, &len );
-	return nv::string_view( str, len );
+	return nv::string_view( str, static_cast< nv::uint32 >( len ) );
 }
 
Index: trunk/nv/lua/lua_state.hh
===================================================================
--- trunk/nv/lua/lua_state.hh	(revision 532)
+++ trunk/nv/lua/lua_state.hh	(revision 533)
@@ -369,5 +369,5 @@
 			table_guard( const table_guard& parent, const path& p );
 			virtual ~table_guard();
-			size_t get_size();
+			uint32 get_size();
 			
 			bool has_field( string_view element );
Index: trunk/nv/stl/algorithm/heap.hh
===================================================================
--- trunk/nv/stl/algorithm/heap.hh	(revision 532)
+++ trunk/nv/stl/algorithm/heap.hh	(revision 533)
@@ -25,5 +25,4 @@
 		template< 
 			typename RandomAccessIterator,
-			typename DifferenceType,
 			typename T,
 			typename Predicate
@@ -31,6 +30,6 @@
 		inline void push_heap_impl( 
 			RandomAccessIterator first, 
-			DifferenceType pivot,
-			DifferenceType top,
+			ptrdiff_t pivot,
+			ptrdiff_t top,
 			T&& value, 
 			Predicate pred
@@ -38,5 +37,5 @@
 		{
 			for ( 
-				DifferenceType index = ( pivot - 1 ) / 2;
+				ptrdiff_t index = ( pivot - 1 ) / 2;
 				top < pivot && pred( *( first + index ), value );
 				index = ( pivot - 1 ) / 2 )
@@ -51,5 +50,4 @@
 		template<
 			typename RandomAccessIterator,
-			typename DifferenceType,
 			typename T,
 			typename Predicate
@@ -57,12 +55,12 @@
 		inline void fix_heap(
 			RandomAccessIterator first,
-			DifferenceType pivot,
-			DifferenceType bottom,
+			ptrdiff_t pivot,
+			ptrdiff_t bottom,
 			T&& value,
 			Predicate pred
 		)
 		{
-			DifferenceType top = pivot;
-			DifferenceType index = 2 * pivot + 2;
+			ptrdiff_t top = pivot;
+			ptrdiff_t index = 2 * pivot + 2;
 			for ( ; index < bottom; index = 2 * index + 2 )
 			{
Index: trunk/nv/stl/container/contiguous_storage.hh
===================================================================
--- trunk/nv/stl/container/contiguous_storage.hh	(revision 532)
+++ trunk/nv/stl/container/contiguous_storage.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -21,5 +21,5 @@
 {
 
-	template< typename T, size_t N >
+	template< typename T, uint32 N >
 	class static_storage
 	{
@@ -36,5 +36,5 @@
 
 	protected:
-		static constexpr bool reallocate( size_t new_size, bool /*copy_needed*/ ) { return new_size <= N; }
+		static constexpr bool reallocate( uint32 new_size, bool /*copy_needed*/ ) { return new_size <= N; }
 
 		static_storage() = default;
@@ -89,5 +89,5 @@
 		~dynamic_storage() = default;
 
-		bool reallocate( size_t new_size, bool copy_needed )
+		bool reallocate( uint32 new_size, bool copy_needed )
 		{
 			if ( copy_needed )
Index: trunk/nv/stl/container/growing_storage.hh
===================================================================
--- trunk/nv/stl/container/growing_storage.hh	(revision 532)
+++ trunk/nv/stl/container/growing_storage.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -35,14 +35,14 @@
 	namespace detail
 	{
-		template < typename SizeType, size_t Capacity >
+		template < typename SizeType, uint32 Capacity >
 		struct growing_storage_size
 		{
-			static constexpr size_t max_size() { return Capacity; }
-			static constexpr size_t capacity() { return Capacity; }
-			constexpr size_t size() const { return m_size; }
-
-			inline void size( size_t new_size ) { m_size = static_cast< SizeType >( new_size ); }
-
-			operator size_t( ) const { return m_size; }
+			static constexpr uint32 max_size() { return Capacity; }
+			static constexpr uint32 capacity() { return Capacity; }
+			constexpr uint32 size() const { return m_size; }
+
+			inline void size( uint32 new_size ) { m_size = static_cast< SizeType >( new_size ); }
+
+			operator uint32( ) const { return m_size; }
 
 			SizeType m_size = 0;
@@ -52,12 +52,12 @@
 		struct growing_storage_size< SizeType, 0 >
 		{
-			static constexpr size_t max_size() { return size_t( 0x80000000 ); }
-			constexpr size_t capacity() const { return m_capacity; }
-			constexpr size_t size() const { return m_size; }
-
-			inline void capacity( size_t new_capacity ) { m_capacity = static_cast< SizeType >( new_capacity ); }
-			inline void size( size_t new_size ) { m_size = static_cast< SizeType >( new_size ); }
-
-			operator size_t() const { return m_size; }
+			static constexpr uint32 max_size() { return uint32( 0x80000000 ); }
+			constexpr uint32 capacity() const { return m_capacity; }
+			constexpr uint32 size() const { return m_size; }
+
+			inline void capacity( uint32 new_capacity ) { m_capacity = static_cast< SizeType >( new_capacity ); }
+			inline void size( uint32 new_size ) { m_size = static_cast< SizeType >( new_size ); }
+
+			operator uint32() const { return m_size; }
 
 			SizeType m_size = 0;
@@ -69,7 +69,7 @@
 		typename Storage,
 		typename InitializePolicy = policy_initialize_standard,
-		typename SizeType = size_t,
-		size_t Capacity = 0,
-		typename NextCapacity = default_next_capacity< size_t >
+		typename SizeType = uint32,
+		uint32 Capacity = 0,
+		typename NextCapacity = default_next_capacity< uint32 >
 	>
 	class growing_storage : public Storage
@@ -78,5 +78,5 @@
 		typedef detail::growing_storage_size< SizeType, Capacity > size_impl_type;
 		typedef typename Storage::value_type value_type;
-		typedef size_t                       size_type;
+		typedef uint32                       size_type;
 		typedef SizeType                     size_store_type;
 		typedef value_type*                  iterator;
@@ -298,12 +298,12 @@
 		}
 
-		template< size_t C = Capacity >
-		enable_if_t< C != 0, bool > try_reallocate( size_t, bool )
+		template< uint32 C = Capacity >
+		enable_if_t< C != 0, bool > try_reallocate( uint32, bool )
 		{
 			return false;
 		}
 
-		template< size_t C = Capacity >
-		enable_if_t< C == 0, bool > try_reallocate( size_t new_capacity, bool copy_needed )
+		template< uint32 C = Capacity >
+		enable_if_t< C == 0, bool > try_reallocate( uint32 new_capacity, bool copy_needed )
 		{
 			if ( new_capacity > 0 && Storage::reallocate( new_capacity, copy_needed ) )
@@ -316,5 +316,5 @@
 
 		// TODO: return type error checking
-		bool try_grow( size_t amount, size_t extra = 0 )
+		bool try_grow( uint32 amount, uint32 extra = 0 )
 		{
 			size_type new_size = amount + m_size + extra;
@@ -329,5 +329,5 @@
 
 		// TODO: return type error checking
-		bool try_reserve( size_t new_capacity, bool copy_needed )
+		bool try_reserve( uint32 new_capacity, bool copy_needed )
 		{
 			if ( new_capacity > m_size.capacity() )
@@ -338,5 +338,5 @@
 		}
 		// TODO: return type error checking
-		bool try_resize( size_t new_size, bool copy_needed, size_t extra = 0 )
+		bool try_resize( uint32 new_size, bool copy_needed, uint32 extra = 0 )
 		{
 			if ( new_size > m_size )
Index: trunk/nv/stl/container/hash_table.hh
===================================================================
--- trunk/nv/stl/container/hash_table.hh	(revision 532)
+++ trunk/nv/stl/container/hash_table.hh	(revision 533)
@@ -151,5 +151,5 @@
 		typedef table_iterator< true >       const_iterator;
 
-		typedef size_t size_type;
+		typedef uint32 size_type;
 		typedef node_type* bucket_type;
 
@@ -160,5 +160,5 @@
 		}
 
-		explicit hash_table_storage( size_t count )
+		explicit hash_table_storage( uint32 count )
 			: m_buckets( nullptr ), m_bucket_count( 0 ), m_element_count( 0 ), m_max_load_factor( 1.0f )
 		{
@@ -301,5 +301,5 @@
 		bool rehash_check( size_type new_elements )
 		{
-			size_t new_buckets = RehashPolicy::is_rehash_required( m_bucket_count, m_element_count + new_elements, m_max_load_factor );
+			uint32 new_buckets = RehashPolicy::is_rehash_required( m_bucket_count, m_element_count + new_elements, m_max_load_factor );
 			if ( new_buckets )
 			{
@@ -365,5 +365,5 @@
 		}
 
-		size_type bucket_index( hash_type hash_code, size_t b_count ) const
+		size_type bucket_index( hash_type hash_code, uint32 b_count ) const
 		{
 			return RehashPolicy::template get_index<hash_type>( hash_code, b_count );
@@ -432,5 +432,5 @@
 		typedef typename HashEntryPolicy::key_type    key_type;
 		typedef typename HashEntryPolicy::mapped_type mapped_type;
-		typedef size_t                                size_type;
+		typedef uint32                                size_type;
 		typedef ptrdiff_t                             difference_type;
 		typedef value_type&                           reference;
Index: trunk/nv/stl/container/hash_table_policy.hh
===================================================================
--- trunk/nv/stl/container/hash_table_policy.hh	(revision 532)
+++ trunk/nv/stl/container/hash_table_policy.hh	(revision 533)
@@ -145,10 +145,10 @@
 	{
 		template< typename H >
-		static enable_if_t< is_integral< H >::value, size_t >
-		get_index( H h, size_t n ) { return h % n; }
+		static enable_if_t< is_integral< H >::value, uint32 >
+		get_index( H h, uint32 n ) { return h % n; }
 
 		template< typename H >
-		static enable_if_t< is_class< H >::value, size_t >
-		get_index( H h, size_t n ) { return h.value() % n; }
+		static enable_if_t< is_class< H >::value, uint32 >
+		get_index( H h, uint32 n ) { return h.value() % n; }
 
 
Index: trunk/nv/stl/container/initialize_policy.hh
===================================================================
--- trunk/nv/stl/container/initialize_policy.hh	(revision 532)
+++ trunk/nv/stl/container/initialize_policy.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
Index: trunk/nv/stl/container/random_access.hh
===================================================================
--- trunk/nv/stl/container/random_access.hh	(revision 532)
+++ trunk/nv/stl/container/random_access.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -59,5 +59,5 @@
 		inline const_reverse_iterator rend() const { return const_reverse_iterator( begin() ); }
 		inline const_reverse_iterator crend() const { return const_reverse_iterator( begin() ); }
-		inline const_iterator iat( size_t i ) const { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
+		inline const_iterator iat( uint32 i ) const { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
 	};
 
@@ -114,6 +114,6 @@
 		inline const_reverse_iterator rend() const { return const_reverse_iterator( begin() ); }
 		inline const_reverse_iterator crend() const { return const_reverse_iterator( begin() ); }
-		inline const_iterator iat( size_t i ) const { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
-		inline iterator       iat( size_t i ) { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
+		inline const_iterator iat( uint32 i ) const { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
+		inline iterator       iat( uint32 i ) { NV_ASSERT( i <= Super::size(), "Index out of range" ); return begin() + i; }
 	};
 }
Index: trunk/nv/stl/container/sized_storage.hh
===================================================================
--- trunk/nv/stl/container/sized_storage.hh	(revision 532)
+++ trunk/nv/stl/container/sized_storage.hh	(revision 533)
@@ -23,10 +23,10 @@
 		typename Storage,
 		typename InitializePolicy = policy_initialize_standard,
-		typename SizeType = size_t
+		typename SizeType = uint32
 	>
 	class sized_storage : public Storage
 	{
 	public:
-		typedef size_t                       size_type;
+		typedef uint32                       size_type;
 		typedef SizeType                     size_store_type;
 		typedef typename Storage::value_type value_type;
@@ -132,5 +132,5 @@
 
 		// TODO: return type error checking
-		bool try_resize( size_t new_size, bool copy_needed )
+		bool try_resize( uint32 new_size, bool copy_needed )
 		{
 			if ( new_size != m_size )
Index: trunk/nv/stl/functional/hash.hh
===================================================================
--- trunk/nv/stl/functional/hash.hh	(revision 532)
+++ trunk/nv/stl/functional/hash.hh	(revision 533)
@@ -54,5 +54,5 @@
 			}
 			template < typename T >
-			static constexpr H hash( const T* p, size_t sz, H basis = hash_basis )
+			static constexpr H hash( const T* p, uint32 sz, H basis = hash_basis )
 			{
 				return p != nullptr ? hash_impl( reinterpret_cast<const char*>(p), sizeof(T)*sz, basis ) : 0;
@@ -63,5 +63,5 @@
 				return c == 0 ? value : str_hash_impl( remain[0], remain + 1, static_cast<H>( value ^ static_cast<H>( c ) ) * hash_prime );
 			}
-			static constexpr H hash_impl( const char* current, size_t remain, H value )
+			static constexpr H hash_impl( const char* current, uint32 remain, H value )
 			{
 				return remain == 0 ? value : hash_impl( current + 1, remain - 1, static_cast<H>( value ^ static_cast<H>( current[0] ) ) * hash_prime );
@@ -156,5 +156,5 @@
 
 	template < typename H >
-	constexpr H hash_string( const char* s, size_t length )
+	constexpr H hash_string( const char* s, uint32 length )
 	{
 		return detail::fnv_hash<H>::hash( s, length );
@@ -257,10 +257,10 @@
 	constexpr uint32 operator "" _h32( const char* str, size_t len )
 	{
-		return detail::fnv_hash< uint32 >::hash( str, len );
+		return detail::fnv_hash< uint32 >::hash( str, static_cast< uint32 >( len ) );
 	}
 
 	constexpr uint64 operator "" _h64( const char* str, size_t len )
 	{
-		return detail::fnv_hash< uint64 >::hash( str, len );
+		return detail::fnv_hash< uint64 >::hash( str, static_cast< uint32 >( len ) );
 	}
 
Index: trunk/nv/stl/handle.hh
===================================================================
--- trunk/nv/stl/handle.hh	(revision 532)
+++ trunk/nv/stl/handle.hh	(revision 533)
@@ -46,6 +46,6 @@
 
 		constexpr T index() const { return m_index; }
-		//size_t hash() const { return hash<T>()( T( m_counter << IBITS | m_index ) ); }
-		constexpr size_t hash() const { NV_ASSERT( false, "UNIMPLEMENTED!" ); return 0; }
+		//uint32 hash() const { return hash<T>()( T( m_counter << IBITS | m_index ) ); }
+		constexpr uint32 hash() const { NV_ASSERT( false, "UNIMPLEMENTED!" ); return 0; }
 	protected:
 		T m_index   : IBITS;
Index: trunk/nv/stl/index_table.hh
===================================================================
--- trunk/nv/stl/index_table.hh	(revision 532)
+++ trunk/nv/stl/index_table.hh	(revision 533)
@@ -76,5 +76,5 @@
 		index_type remove_swap( index_type dead_eindex )
 		{
-			if ( size_t( dead_eindex ) >= m_handles.size() ) return -1;
+			if ( uint32( dead_eindex ) >= m_handles.size() ) return -1;
 			handle_type h = m_handles[dead_eindex];
 			handle_type swap_handle = m_handles.back();
@@ -98,5 +98,5 @@
 		handle_type get_handle( index_type i ) const { return m_handles[unsigned( i )]; }
 
-		size_t size() const { return m_handles.size(); }
+		uint32 size() const { return m_handles.size(); }
 
 	private:
@@ -108,5 +108,5 @@
 				if ( size == 0 ) size = 1;
 				while ( i >= size ) size = size * 2;
-				m_indexes.resize( static_cast<size_t>( size ), -1 );
+				m_indexes.resize( static_cast<uint32>( size ), -1 );
 			}
 		}
Index: trunk/nv/stl/memory.hh
===================================================================
--- trunk/nv/stl/memory.hh	(revision 532)
+++ trunk/nv/stl/memory.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2015 ChaosForge Ltd
+// Copyright (C) 2015-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -36,5 +36,5 @@
 	public:
 		typedef T                                    value_type;
-		typedef size_t                               size_type;
+		typedef uint32                               size_type;
 		typedef ptrdiff_t                            difference_type;
 		typedef value_type*                          pointer;
@@ -55,5 +55,5 @@
 		constexpr array_ref( value_type* a_data, size_type a_size )
 			: m_data( a_data ), m_size( a_size ) {}
-		template< size_t N >
+		template< uint32 N >
 		constexpr explicit array_ref( value_type( &a_data )[N] )
 			: m_data( a_data ), m_size( N ) {}
@@ -65,5 +65,5 @@
 		}
 
-		constexpr size_t size() const { return m_size; }
+		constexpr size_type size() const { return m_size; }
 		constexpr bool empty() const { return m_size != 0; }
 		constexpr const value_type* data() const { return m_data; }
@@ -85,6 +85,6 @@
 		constexpr const_reverse_iterator crbegin() const { return const_reverse_iterator( end() ); }
 		constexpr const_reverse_iterator crend() const { return const_reverse_iterator( begin() ); }
-		inline    const_iterator iat( size_t i ) const { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
-		inline    iterator       iat( size_t i ) { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
+		inline    const_iterator iat( uint32 i ) const { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
+		inline    iterator       iat( uint32 i ) { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
 
 		inline reference       front() { NV_ASSERT_ALWAYS( !empty(), "front() called on empty data!" );  return m_data[0]; }
@@ -107,5 +107,5 @@
 	public:
 		typedef T                                    value_type;
-		typedef size_t                               size_type;
+		typedef uint32                               size_type;
 		typedef ptrdiff_t                            difference_type;
 		typedef const value_type*                    pointer;
@@ -128,5 +128,5 @@
 		constexpr array_view( const array_ref<T>& view )
 			: m_data( view.data() ), m_size( view.size() ) {}
-		template< size_t N >
+		template< uint32 N >
 		constexpr explicit array_view( const value_type( &a_data )[N] )
 			: m_data( a_data ), m_size( N ) {}
@@ -156,5 +156,5 @@
 		inline const_reference back() const { NV_ASSERT_ALWAYS( !empty(), "front() called on empty data!" ); return m_data[m_size - 1]; }
 
-		inline const_iterator iat( size_t i ) const { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
+		inline const_iterator iat( uint32 i ) const { NV_ASSERT_ALWAYS( i <= m_size, "Index out of range" ); return begin() + i; }
 		const_reference operator[]( size_type i ) const { NV_ASSERT_ALWAYS( i < m_size, "Out of range" ); return m_data[i]; }
 
Index: trunk/nv/stl/string.hh
===================================================================
--- trunk/nv/stl/string.hh	(revision 532)
+++ trunk/nv/stl/string.hh	(revision 533)
@@ -59,6 +59,6 @@
 	inline string_view trimmed( const string_view& str )
 	{
-		size_t endpos = str.find_last_not_of( " \r\n\t" );
-		size_t startpos = str.find_first_not_of( " \r\n\t" );
+		uint32 endpos = str.find_last_not_of( " \r\n\t" );
+		uint32 startpos = str.find_first_not_of( " \r\n\t" );
 
 		if ( string_view::npos != endpos || string_view::npos != startpos )
@@ -73,5 +73,5 @@
 	inline string_view rtrimmed( const string_view& str )
 	{
-		size_t endpos = str.find_last_not_of( " \r\n\t" );
+		uint32 endpos = str.find_last_not_of( " \r\n\t" );
 		if ( string_view::npos != endpos )
 		{
@@ -83,5 +83,5 @@
 	inline string_view ltrimmed( const string_view& str )
 	{
-		size_t startpos = str.find_first_not_of( " \r\n\t" );
+		uint32 startpos = str.find_first_not_of( " \r\n\t" );
 		if ( string_view::npos != startpos )
 		{
@@ -94,5 +94,5 @@
 	inline string_view extract_extension( string_view filename )
 	{
-		size_t lastdot = filename.find_last_of( '.' );
+		uint32 lastdot = filename.find_last_of( '.' );
 		if ( string_view::npos != lastdot )
 			return filename.substr( lastdot + 1 );
@@ -102,5 +102,5 @@
 	inline string_view without_extension( string_view filename )
 	{
-		size_t lastdot = filename.find_last_of( '.' );
+		uint32 lastdot = filename.find_last_of( '.' );
 		if ( string_view::npos != lastdot )
 			return filename.substr( 0, lastdot );
@@ -124,12 +124,12 @@
 		template < typename S >
 		inline string_hash( const string_base<S>& rhs ) : inherited_type( hash_string< H >( rhs.data(), rhs.size() ) ) {}
-		constexpr string_hash( const char* str, size_t len ) : inherited_type( hash_string< H >( str, len ) ) {}
+		constexpr string_hash( const char* str, uint32 len ) : inherited_type( hash_string< H >( str, len ) ) {}
 		constexpr string_hash( const char* str ) : inherited_type( hash_string< H >( str ) ) {}
 
 		// Literal constructors
 		template< size_t N >
-		constexpr string_hash( char( &s )[N] ) : inherited_type( hash_string< H >( s, N - 1 ) ) {}
+		constexpr string_hash( char( &s )[N] ) : inherited_type( hash_string< H >( s, static_cast< uint32 >( N - 1 ) ) ) {}
 		template< size_t N >
-		constexpr string_hash( const char( &s )[N] ) : inherited_type( hash_string< H >( s, N - 1 ) ) {}
+		constexpr string_hash( const char( &s )[N] ) : inherited_type( hash_string< H >( s, static_cast< uint32 >( N - 1 ) ) ) {}
 
 		constexpr explicit string_hash( hash_type value ) : inherited_type( value ) {}
@@ -141,10 +141,10 @@
 	constexpr shash32 operator "" _sh32( const char* str, size_t len )
 	{
-		return shash32( detail::fnv_hash< uint32 >::hash( str, len ) );
+		return shash32( detail::fnv_hash< uint32 >::hash( str, static_cast< uint32 >( len ) ) );
 	}
 
 	constexpr shash64 operator "" _sh64( const char* str, size_t len )
 	{
-		return shash64( detail::fnv_hash< uint64 >::hash( str, len ) );
+		return shash64( detail::fnv_hash< uint64 >::hash( str, static_cast< uint32 >( len ) ) );
 	}
 }
Index: trunk/nv/stl/string/const_string.hh
===================================================================
--- trunk/nv/stl/string/const_string.hh	(revision 532)
+++ trunk/nv/stl/string/const_string.hh	(revision 533)
@@ -25,5 +25,5 @@
 		inline explicit const_string( const char* str )
 		{
-			initialize( str, nvstrlen( str ) );
+			initialize( str, static_cast< uint32 >( nvstrlen( str ) ) );
 		}
 		inline const_string( const string_view& rhs ) 
@@ -34,10 +34,10 @@
 		inline const_string( char( &s )[N] )
 		{
-			initialize( s, N-1 );
+			initialize( s, static_cast< uint32 >( N-1 ) );
 		}
 		template< size_t N >
 		inline const_string( const char( &s )[N] )
 		{
-			initialize( s, N - 1 );
+			initialize( s, static_cast< uint32 >( N - 1 ) );
 		}
 		// TODO : implement
Index: trunk/nv/stl/string/literal_string.hh
===================================================================
--- trunk/nv/stl/string/literal_string.hh	(revision 532)
+++ trunk/nv/stl/string/literal_string.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2012-2015 ChaosForge Ltd
+// Copyright (C) 2012-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -16,5 +16,5 @@
 	class literal_string : public string_base< array_view< char > >
 	{
-		constexpr literal_string( const char* str, size_t len ) : this_type( str, len ) {}
+		constexpr literal_string( const char* str, uint32 len ) : this_type( str, len ) {}
 	public:
 		typedef string_base< array_view< char > > this_type;
@@ -22,12 +22,12 @@
 
 		template< size_t N >
-		constexpr literal_string( char( &s )[N] ) : this_type( s, N - 1 ) {}
+		constexpr literal_string( char( &s )[N] ) : this_type( s, static_cast< uint32 >( N - 1 ) ) {}
 		template< size_t N >
-		constexpr literal_string( const char( &s )[N] ) : this_type( s, N - 1 ) {}
+		constexpr literal_string( const char( &s )[N] ) : this_type( s, static_cast< uint32 >( N - 1 ) ) {}
 	};
 
 	constexpr literal_string operator "" _ls( const char* str, size_t len )
 	{
-		return literal_string( str, len );
+		return literal_string( str, static_cast< uint32 >( len ) );
 	}
 
@@ -40,5 +40,5 @@
 	class hashed_literal_string : public string_base< array_view< char > >
 	{
-		constexpr hashed_literal_string( const char* str, size_t len, H hash_code ) 
+		constexpr hashed_literal_string( const char* str, uint32 len, H hash_code ) 
 			: this_type( str, len ), m_hash( hash_code ) {}
 	public:
@@ -67,10 +67,10 @@
 	constexpr hashed_literal_string_32 operator "" _hls32( const char* str, size_t len )
 	{
-		return hashed_literal_string_32( str, len, detail::fnv_hash< uint32 >::hash( str, len ) );
+		return hashed_literal_string_32( str, static_cast< uint32 >( len ), detail::fnv_hash< uint32 >::hash( str, static_cast< uint32 >( len ) ) );
 	}
 
 	constexpr hashed_literal_string_64 operator "" _hls64( const char* str, size_t len )
 	{
-		return hashed_literal_string_64( str, len, detail::fnv_hash< uint64 >::hash( str, len ) );
+		return hashed_literal_string_64( str, static_cast< uint32 >( len ), detail::fnv_hash< uint64 >::hash( str, static_cast< uint32 >( len ) ) );
 	}
 
Index: trunk/nv/stl/string/string_base.hh
===================================================================
--- trunk/nv/stl/string/string_base.hh	(revision 532)
+++ trunk/nv/stl/string/string_base.hh	(revision 533)
@@ -16,10 +16,10 @@
 {
 
-	size_t sint32_to_buffer( array_ref< char > buffer, sint32 n );
-	size_t sint64_to_buffer( array_ref< char > buffer, sint64 n );
-	size_t uint32_to_buffer( array_ref< char > buffer, uint32 n );
-	size_t uint64_to_buffer( array_ref< char > buffer, uint64 n );
-	size_t f32_to_buffer( array_ref< char > buffer, f32 n );
-	size_t f64_to_buffer( array_ref< char > buffer, f64 n );
+	uint32 sint32_to_buffer( array_ref< char > buffer, sint32 n );
+	uint32 sint64_to_buffer( array_ref< char > buffer, sint64 n );
+	uint32 uint32_to_buffer( array_ref< char > buffer, uint32 n );
+	uint32 uint64_to_buffer( array_ref< char > buffer, uint64 n );
+	uint32 f32_to_buffer( array_ref< char > buffer, f32 n );
+	uint32 f64_to_buffer( array_ref< char > buffer, f64 n );
 
 	sint32 buffer_to_sint32( const char* str, char** end );
@@ -90,5 +90,5 @@
 		size_type reverse_distance( ReverseIterator first, ReverseIterator last ) const
 		{
-			return this->size() - 1 - static_cast<size_t>( nv::distance( first, last ) );
+			return this->size() - 1 - static_cast<uint32>( nv::distance( first, last ) );
 		}
 	};
@@ -124,9 +124,9 @@
 		// Non-literal constructors
 		template< typename U >
-		inline string_view( U str, typename enable_if<is_same<U, const char*>::value>::type* = nullptr ) : this_type( str, str ? nvstrlen( str ) : 0 ) {}
+		inline string_view( U str, typename enable_if<is_same<U, const char*>::value>::type* = nullptr ) : this_type( str, str ? static_cast< uint32 >( nvstrlen( str ) ) : 0 ) {}
 
 		// Non-literal constructors
 		template< typename U >
-		inline string_view( U str, typename enable_if<is_same<U, char*>::value>::type* = nullptr ) : this_type( str, nvstrlen( str ) ) {}
+		inline string_view( U str, typename enable_if<is_same<U, char*>::value>::type* = nullptr ) : this_type( str, static_cast< uint32 >( nvstrlen( str ) ) ) {}
 
 		inline string_view& operator=( const string_view &rhs )
Index: trunk/nv/stl/string/string_twine.hh
===================================================================
--- trunk/nv/stl/string/string_twine.hh	(revision 532)
+++ trunk/nv/stl/string/string_twine.hh	(revision 533)
@@ -75,5 +75,5 @@
 		string_twine( const string_twine& s ) = default;
 
-		string_twine( const char* data, size_t sz )
+		string_twine( const char* data, uint32 sz )
 			: m_lhs( data, sz ), m_rhs()
 		{
@@ -102,5 +102,5 @@
 		}
 
-		size_t dump_size() const
+		uint32 dump_size() const
 		{
 			return dump_size( m_lhs ) + dump_size( m_rhs );
@@ -114,5 +114,5 @@
 		struct twine_cstring
 		{
-			size_t      size;
+			uint32      size;
 			const char* data;
 		};
@@ -141,5 +141,5 @@
 			twine_node( const string_twine* v ) : type( TWINE ) { value.twine = v; }
 			twine_node( const string_view* v ) : type( STRING ) { value.string = v; }
-			twine_node( const char* d, size_t s ) : type( CSTRING ) { value.cstring.data = d; value.cstring.size = s; }
+			twine_node( const char* d, uint32 s ) : type( CSTRING ) { value.cstring.data = d; value.cstring.size = s; }
 		};
 
@@ -168,5 +168,5 @@
 		}
 
-		size_t dump_size( const twine_node& node ) const
+		uint32 dump_size( const twine_node& node ) const
 		{
 			switch ( node.type )
@@ -201,5 +201,5 @@
 		void dump_string( array_ref< char >& target, const string_view& string ) const
 		{
-			size_t dump_length = nv::min( target.size(), string.size() );
+			uint32 dump_length = nv::min( target.size(), string.size() );
 			if ( dump_length > 0 )
 			{
@@ -219,5 +219,5 @@
 	inline string_twine operator+( const char (&lhs)[N], const string_twine& rhs )
 	{
-		return string_twine( lhs, N-1 ).concat( rhs );
+		return string_twine( lhs, static_cast< uint32 >( N-1 ) ).concat( rhs );
 	}
 
@@ -225,5 +225,5 @@
 	inline string_twine operator+( const string_twine& lhs, const char( &rhs )[N] )
 	{
-		return lhs.concat( string_twine( rhs, N - 1 ) );
+		return lhs.concat( string_twine( rhs, static_cast< uint32 >( N - 1 ) ) );
 	}
 
Index: trunk/nv/stl/vector.hh
===================================================================
--- trunk/nv/stl/vector.hh	(revision 532)
+++ trunk/nv/stl/vector.hh	(revision 533)
@@ -1,3 +1,3 @@
-// Copyright (C) 2014-2015 ChaosForge Ltd
+// Copyright (C) 2014-2017 ChaosForge Ltd
 // http://chaosforge.org/
 //
@@ -25,5 +25,5 @@
 	using growable_dynamic_storage = growing_storage< dynamic_storage< T > >;
 
-	template< typename T, size_t N >
+	template< typename T, uint32 N >
 	using growable_static_storage = growing_storage< static_storage< T, N > >;
 
Index: trunk/nv_bullet.lua
===================================================================
--- trunk/nv_bullet.lua	(revision 532)
+++ trunk/nv_bullet.lua	(revision 533)
@@ -27,9 +27,26 @@
 	links { "nv-core", "nv-gl", "nv-formats", "nv-lua", "nv-lib", "nv-io", "nv-gfx" }
 
+	includedirs { "D:/Libraries/bullet2/src/" }
+
 	configuration "debug"
-		nv_bullet_configure( "D:/Libraries/bullet2/", "Debug", "_debug" )
+		nv_bullet_configure( "D:/Libraries/bullet2/x86/", "RelWithDebInfo", "_rdbg" )
+--		nv_bullet_configure( "D:/Libraries/bullet2/x86/", "Debug", "_debug" )
 
-	configuration "not debug"
-		nv_bullet_configure( "D:/Libraries/bullet2/", "Release" )
+	configuration "profiler"
+		nv_bullet_configure( "D:/Libraries/bullet2/x86/", "Release" )
+
+	configuration "release"
+		nv_bullet_configure( "D:/Libraries/bullet2/x86/", "Release" )
+
+	configuration "debug_64"
+		nv_bullet_configure( "D:/Libraries/bullet2/x86_64/", "RelWithDebInfo", "_rdbg" )
+--		nv_bullet_configure( "D:/Libraries/bullet2/x86_64/", "Debug", "_debug" )
+
+	configuration "profiler_64"
+		nv_bullet_configure( "D:/Libraries/bullet2/x86_64/", "Release" )
+
+	configuration "release_64"
+		nv_bullet_configure( "D:/Libraries/bullet2/x86_64/", "Release" )
 
 
+
Index: trunk/src/core/logger.cc
===================================================================
--- trunk/src/core/logger.cc	(revision 532)
+++ trunk/src/core/logger.cc	(revision 533)
@@ -144,5 +144,5 @@
 {
 	char stamp[16];
-	size_t ssize = timestamp( stamp );
+	uint32 ssize = timestamp( stamp );
 
 #if NV_COMPILER == NV_MSVC 
@@ -180,5 +180,5 @@
 {
 	char stamp[16];
-	size_t ssize = timestamp( stamp );
+	uint32 ssize = timestamp( stamp );
 #if 0 // NV_PLATFORM == NV_WINDOWS
 	// Turns out WriteFile on Windows is unbuffered and quite slower than fwrite 
@@ -242,5 +242,5 @@
 }
 
-nv::size_t nv::log_sink::timestamp( char* buffer ) const
+nv::uint32 nv::log_sink::timestamp( char* buffer ) const
 {
 	uint32 ms = get_system_ms();
Index: trunk/src/core/profiler.cc
===================================================================
--- trunk/src/core/profiler.cc	(revision 532)
+++ trunk/src/core/profiler.cc	(revision 533)
@@ -109,5 +109,5 @@
 	char buffer[128];
 	snprintf( buffer, 128, "%-23s %6s %6s %9s %6s", "TAG", "%PARNT", "CALLS", "TOTAL(ms)", "AVG(ms)" );
-	NV_LOG_INFO( string_view( buffer, nvstrlen( buffer ) ) );
+	NV_LOG_INFO( string_view( buffer, static_cast< uint32 >( nvstrlen( buffer ) ) ) );
  	log_node_children( 0, m_root );
 	NV_LOG_INFO( "-- PROFILER REPORT END ---------------------------------" );
@@ -131,5 +131,5 @@
 			snprintf( buffer + indent, 128 - indent, "%*.*s %6.2f %6d %9.2f %6.2f", indent - 23, 23 - indent,
 				c->m_tag.data(), pparent, calls, total_ms, avg_ms );
-			NV_LOG_INFO( string_view( buffer, nvstrlen( buffer ) ) );
+			NV_LOG_INFO( string_view( buffer, static_cast< uint32 >( nvstrlen( buffer ) ) ) );
 			if ( c->m_children.size() > 0 )
 			{
Index: trunk/src/core/random.cc
===================================================================
--- trunk/src/core/random.cc	(revision 532)
+++ trunk/src/core/random.cc	(revision 533)
@@ -16,6 +16,6 @@
 static const uint32 mt_matrix_a   = 0x9908B0DFUL;
 
-#define NV_MT_MIXBITS(u, v) ( ( (u) & mt_upper_mask) | ( (v) & mt_lower_mask) )
-#define NV_MT_TWIST(u, v)  ( (NV_MT_MIXBITS(u, v) >> 1) ^ ( (v) & 1UL ? mt_matrix_a : 0UL) )
+#define NV_MT_MIXBITS(u, v) ( uint32( (u) & mt_upper_mask) | uint32( (v) & mt_lower_mask) )
+#define NV_MT_TWIST(u, v)  ( uint32(NV_MT_MIXBITS(u, v) >> uint32(1)) ^ uint32( (v) & uint32(1) ? mt_matrix_a : uint32(0)) )
 
 nv::random& random::get()
@@ -43,12 +43,16 @@
 {
 	uint32 *p = m_state;
-
-	for ( int count = ( mersenne_n - mersenne_m + 1 ); --count; p++ )
+	constexpr int m = mersenne_m;
+	constexpr int n = mersenne_n;
+
+	for ( int count = ( n - m + 1 ); --count; p++ )
 		*p = p[mersenne_m] ^ NV_MT_TWIST( p[0], p[1] );
 
 	for ( int count = mersenne_m; --count; p++ )
-		*p = p[mersenne_m - mersenne_n] ^ NV_MT_TWIST( p[0], p[1] );
-
-	*p = p[mersenne_m - mersenne_n] ^ NV_MT_TWIST( p[0], m_state[0] );
+	{
+		*p = p[m - n] ^ NV_MT_TWIST( p[0], p[1] );
+	}
+
+	*p = p[m - n] ^ NV_MT_TWIST( p[0], m_state[0] );
 
 	m_remaining = mersenne_n;
Index: trunk/src/gfx/texture_atlas.cc
===================================================================
--- trunk/src/gfx/texture_atlas.cc	(revision 532)
+++ trunk/src/gfx/texture_atlas.cc	(revision 533)
@@ -11,5 +11,5 @@
 using namespace nv;
 
-texture_atlas::texture_atlas( ivec2 size, nv::size_t depth, nv::size_t border /*= 1*/ )
+texture_atlas::texture_atlas( ivec2 size, uint32 depth, uint32 border /*= 1*/ )
 	: image( size, depth ), m_used( 0 ), m_border( border )
 {
@@ -26,5 +26,5 @@
 	int best_width  = nv::limits::si_max;
 
-	for( size_t i=0; i < m_nodes.size(); ++i )
+	for( uint32 i=0; i < m_nodes.size(); ++i )
 	{
 		int y = fit( i, size );
@@ -51,5 +51,5 @@
 	m_nodes.insert( m_nodes.begin() + best_index, ivec3( r.pos.x, r.pos.y + size.y, size.x ) );
 
-	for( size_t i = static_cast<size_t>( best_index )+1; i < m_nodes.size(); ++i )
+	for( uint32 i = static_cast<uint32>( best_index )+1; i < m_nodes.size(); ++i )
 	{
 		ivec3 node = m_nodes[ i ];
@@ -82,5 +82,5 @@
 }
 
-int texture_atlas::fit( nv::size_t index, ivec2 size )
+int texture_atlas::fit( uint32 index, ivec2 size )
 {
 	ivec3 node = m_nodes[ index ];
@@ -113,5 +113,5 @@
 void texture_atlas::merge()
 {
-	for ( size_t i=0; i < m_nodes.size()-1; ++i )
+	for ( uint32 i=0; i < m_nodes.size()-1; ++i )
     {
 		if ( m_nodes[ i ].y == m_nodes[ i+1 ].y )
Index: trunk/src/gl/gl_device.cc
===================================================================
--- trunk/src/gl/gl_device.cc	(revision 532)
+++ trunk/src/gl/gl_device.cc	(revision 533)
@@ -452,5 +452,5 @@
 		glGetActiveUniform( p->glid, i, 128, &uni_nlen, &uni_len, &uni_type, name_buffer );
 
-		string_view name( name_buffer, size_t( uni_nlen ) );
+		string_view name( name_buffer, uint32( uni_nlen ) );
 
 		// skip built-ins
@@ -461,5 +461,5 @@
 
 		// check for array
-		size_t arrchar = name.find( '[' );
+		uint32 arrchar = name.find( '[' );
 		if ( arrchar != string_view::npos )
 		{
Index: trunk/src/image/miniz.cc
===================================================================
--- trunk/src/image/miniz.cc	(revision 532)
+++ trunk/src/image/miniz.cc	(revision 533)
@@ -3,10 +3,4 @@
 
 using namespace nv;
-
-#define MINIZ_NO_TIME
-#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
-
-#define MINIZ_HAS_64BIT_REGISTERS 0
-#define TINFL_USE_64BIT_BITBUF 0
 
 #if NV_COMPILER == NV_CLANG
@@ -17,21 +11,6 @@
 
 #if defined( _M_IX86 ) || defined( _M_X64 ) || defined( __i386__ ) || defined( __i386 ) || defined( __i486__ ) || defined( __i486 ) || defined( i386 ) || defined( __ia64__ ) || defined( __x86_64__ )
-// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
-#define MINIZ_X86_OR_X64_CPU 1
-#endif
-
-#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
-// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
-#define MINIZ_LITTLE_ENDIAN 1
-#endif
-
-#if MINIZ_X86_OR_X64_CPU
 // Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
 #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
-#endif
-
-#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
-// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
-#define MINIZ_HAS_64BIT_REGISTERS 1
 #endif
 
@@ -204,78 +183,4 @@
 	const char *mz_error( int err );
 
-	// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used as a drop-in replacement for the subset of zlib that miniz.c supports.
-	// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you use zlib in the same project.
-#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
-	typedef unsigned char Byte;
-	typedef unsigned int uInt;
-	typedef mz_ulong uLong;
-	typedef Byte Bytef;
-	typedef uInt uIntf;
-	typedef char charf;
-	typedef int intf;
-	typedef void *voidpf;
-	typedef uLong uLongf;
-	typedef void *voidp;
-	typedef void *const voidpc;
-#define Z_NULL                0
-#define Z_NO_FLUSH            MZ_NO_FLUSH
-#define Z_PARTIAL_FLUSH       MZ_PARTIAL_FLUSH
-#define Z_SYNC_FLUSH          MZ_SYNC_FLUSH
-#define Z_FULL_FLUSH          MZ_FULL_FLUSH
-#define Z_FINISH              MZ_FINISH
-#define Z_BLOCK               MZ_BLOCK
-#define Z_OK                  MZ_OK
-#define Z_STREAM_END          MZ_STREAM_END
-#define Z_NEED_DICT           MZ_NEED_DICT
-#define Z_ERRNO               MZ_ERRNO
-#define Z_STREAM_ERROR        MZ_STREAM_ERROR
-#define Z_DATA_ERROR          MZ_DATA_ERROR
-#define Z_MEM_ERROR           MZ_MEM_ERROR
-#define Z_BUF_ERROR           MZ_BUF_ERROR
-#define Z_VERSION_ERROR       MZ_VERSION_ERROR
-#define Z_PARAM_ERROR         MZ_PARAM_ERROR
-#define Z_NO_COMPRESSION      MZ_NO_COMPRESSION
-#define Z_BEST_SPEED          MZ_BEST_SPEED
-#define Z_BEST_COMPRESSION    MZ_BEST_COMPRESSION
-#define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION
-#define Z_DEFAULT_STRATEGY    MZ_DEFAULT_STRATEGY
-#define Z_FILTERED            MZ_FILTERED
-#define Z_HUFFMAN_ONLY        MZ_HUFFMAN_ONLY
-#define Z_RLE                 MZ_RLE
-#define Z_FIXED               MZ_FIXED
-#define Z_DEFLATED            MZ_DEFLATED
-#define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS
-#define alloc_func            mz_alloc_func
-#define free_func             mz_free_func
-#define internal_state        mz_internal_state
-#define z_stream              mz_stream
-#define deflateInit           mz_deflateInit
-#define deflateInit2          mz_deflateInit2
-#define deflateReset          mz_deflateReset
-#define deflate               mz_deflate
-#define deflateEnd            mz_deflateEnd
-#define deflateBound          mz_deflateBound
-#define compress              mz_compress
-#define compress2             mz_compress2
-#define compressBound         mz_compressBound
-#define inflateInit           mz_inflateInit
-#define inflateInit2          mz_inflateInit2
-#define inflate               mz_inflate
-#define inflateEnd            mz_inflateEnd
-#define uncompress            mz_uncompress
-#define crc32                 mz_crc32
-#define adler32               mz_adler32
-#define MAX_WBITS             15
-#define MAX_MEM_LEVEL         9
-#define zError                mz_error
-#define ZLIB_VERSION          MZ_VERSION
-#define ZLIB_VERNUM           MZ_VERNUM
-#define ZLIB_VER_MAJOR        MZ_VER_MAJOR
-#define ZLIB_VER_MINOR        MZ_VER_MINOR
-#define ZLIB_VER_REVISION     MZ_VER_REVISION
-#define ZLIB_VER_SUBREVISION  MZ_VER_SUBREVISION
-#define zlibVersion           mz_version
-#define zlib_version          mz_version()
-#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
 
 #endif // MINIZ_NO_ZLIB_APIS
@@ -321,7 +226,6 @@
 		mz_uint16 m_bit_flag;
 		mz_uint16 m_method;
-#ifndef MINIZ_NO_TIME
-		time_t m_time;
-#endif
+//		time_t m_time;
+
 		mz_uint32 m_crc32;
 		mz_uint64 m_comp_size;
@@ -567,9 +471,5 @@
 	} tinfl_huff_table;
 
-#if MINIZ_HAS_64BIT_REGISTERS
-#define TINFL_USE_64BIT_BITBUF 1
-#endif
-
-#if TINFL_USE_64BIT_BITBUF
+#if NV_ARCHITECTURE == NV_64BIT
 	typedef mz_uint64 tinfl_bit_buf_t;
 #define TINFL_BITBUF_SIZE (64)
@@ -766,5 +666,5 @@
 #define MZ_CLEAR_OBJ(obj) nvmemset(&(obj), 0, sizeof(obj))
 
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN
 #define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
 #define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
@@ -1382,5 +1282,5 @@
 						{
 							int sym2; mz_uint code_len;
-#if TINFL_USE_64BIT_BITBUF
+#if NV_ARCHITECTURE == NV_64BIT
 							if ( num_bits < 30 ) { bit_buf |= ( ( (tinfl_bit_buf_t)MZ_READ_LE32( pIn_buf_cur ) ) << num_bits ); pIn_buf_cur += 4; num_bits += 32; }
 #else
@@ -1397,5 +1297,5 @@
 								break;
 
-#if !TINFL_USE_64BIT_BITBUF
+#if NV_ARCHITECTURE == NV_32BIT
 							if ( num_bits < 15 ) { bit_buf |= ( ( (tinfl_bit_buf_t)MZ_READ_LE16( pIn_buf_cur ) ) << num_bits ); pIn_buf_cur += 2; num_bits += 16; }
 #endif
@@ -1835,5 +1735,6 @@
 	static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
 
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN && NV_ARCHITECTURE == NV_64BIT
+
 	static mz_bool tdefl_compress_lz_codes( tdefl_compressor *d )
 	{
@@ -1968,5 +1869,6 @@
 		return ( d->m_pOutput_buf < d->m_pOutput_buf_end );
 	}
-#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN && NV_ARCHITECTURE == NV_64BIT
+
 
 	static mz_bool tdefl_compress_block( tdefl_compressor *d, mz_bool static_block )
@@ -2145,5 +2047,5 @@
 #endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
 
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN
 	static mz_bool tdefl_compress_fast( tdefl_compressor *d )
 	{
@@ -2480,5 +2382,5 @@
 			return ( d->m_prev_return_status = tdefl_flush_output_buffer( d ) );
 
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN
 		if ( ( ( d->m_flags & TDEFL_MAX_PROBES_MASK ) == 1 ) &&
 			( ( d->m_flags & TDEFL_GREEDY_PARSING_FLAG ) != 0 ) &&
@@ -2489,5 +2391,5 @@
 		}
 		else
-#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && NV_ENDIANESS == NV_LITTLEENDIAN
 		{
 			if ( !tdefl_compress_normal( d ) )
Index: trunk/src/io/c_file_system.cc
===================================================================
--- trunk/src/io/c_file_system.cc	(revision 532)
+++ trunk/src/io/c_file_system.cc	(revision 533)
@@ -48,5 +48,5 @@
 	stream* fstream = open( path, "rb" );
 	if ( !fstream ) return const_string();
-	uint32 size = fstream->size();
+	uint32 size = static_cast< uint32 >( fstream->size() );
 	const_string result( nullptr, size );
 	fstream->read( const_cast<char*>( result.data() ), size, 1 );
Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 532)
+++ trunk/src/lua/lua_state.cc	(revision 533)
@@ -172,5 +172,5 @@
 }
 
-nv::size_t lua::table_guard::get_size()
+nv::uint32 lua::table_guard::get_size()
 {
 	return nlua_rawlen( m_state, -1 );
@@ -194,5 +194,5 @@
 	{
 		str = lua_tolstring( m_state, -1, &l );
-		result = hash_string< uint64 >( str, l );
+		result = hash_string< uint64 >( str, static_cast< uint32 >( l ) );
 		//NV_LOG_DEBUG( str );
 	}
@@ -210,5 +210,5 @@
 	{
 		str = lua_tolstring( m_state, -1, &l );
-		string_view sv( str, l );
+		string_view sv( str, static_cast< uint32 >( l ) );
 		result = table ? table->insert( sv ) : shash64( sv );
 	}
@@ -226,5 +226,5 @@
 	{
 		str = lua_tolstring( m_state, -1, &l );
-		result = hash_string< uint64 >( str, l );
+		result = hash_string< uint64 >( str, static_cast< uint32 >( l ) );
 		//NV_LOG_DEBUG( str );
 	}
@@ -247,5 +247,5 @@
 		str = defval.data();
 	}
-	string128 result( str, l );
+	string128 result( str, static_cast< uint32 >( l ) );
 	lua_pop( m_state, 1 );
 	return result;
@@ -266,5 +266,5 @@
 		str = defval.data();
 	}
-	const_string result( str, l );
+	const_string result( str, static_cast< uint32 >( l ) );
 	lua_pop( m_state, 1 );
 	return result;
@@ -280,5 +280,5 @@
 	{
 		str = lua_tolstring( m_state, -1, &l );
-		string_view sv( str, l );
+		string_view sv( str, static_cast< uint32 >( l ) );
 		result = table ? table->insert( sv ) : shash64( sv );
 	}
@@ -301,5 +301,5 @@
  		str = defval.data();
  	}
- 	const_string result( str, l );
+ 	const_string result( str, static_cast< uint32 >( l ) );
  	lua_pop( m_state, 1 );
  	return result;
@@ -320,5 +320,5 @@
 		str = defval.data();
 	}
-	string128 result( str, l );
+	string128 result( str, static_cast< uint32 >( l ) );
 	lua_pop( m_state, 1 );
 	return result;
@@ -339,5 +339,5 @@
 		str = defval.data();
 	}
-	string64 result( str, l );
+	string64 result( str, static_cast< uint32 >( l ) );
 	lua_pop( m_state, 1 );
 	return result;
@@ -359,5 +359,5 @@
 		str = defval.data();
 	}
-	string32 result( str, l );
+	string32 result( str, static_cast< uint32 >( l ) );
 	lua_pop( m_state, 1 );
 	return result;
Index: trunk/src/lua/lua_values.cc
===================================================================
--- trunk/src/lua/lua_values.cc	(revision 532)
+++ trunk/src/lua/lua_values.cc	(revision 533)
@@ -105,5 +105,5 @@
 	size_t length = 0;
 	const char* result = lua_tolstring( L, index, &length );
-	return string_view( result, length );
+	return string_view( result, static_cast< uint32 >( length ) );
 }
 
Index: trunk/src/stl/string.cc
===================================================================
--- trunk/src/stl/string.cc	(revision 532)
+++ trunk/src/stl/string.cc	(revision 533)
@@ -27,5 +27,5 @@
 }
 
-nv::size_t nv::sint32_to_buffer( array_ref< char > buffer, sint32 n )
+nv::uint32 nv::sint32_to_buffer( array_ref< char > buffer, sint32 n )
 {
 	if ( buffer.size() < 2 ) return 0;
@@ -46,8 +46,8 @@
 	*s = '\0';
 	string_reverse( buffer.begin(), s - 1 );
-	return static_cast<nv::size_t>( s - buffer.begin() );
-}
-
-nv::size_t nv::sint64_to_buffer( array_ref< char > buffer, sint64 n )
+	return static_cast<nv::uint32>( s - buffer.begin() );
+}
+
+nv::uint32 nv::sint64_to_buffer( array_ref< char > buffer, sint64 n )
 {
 	if ( buffer.size() < 2 ) return 0;
@@ -68,8 +68,8 @@
 	*s = '\0';
 	string_reverse( buffer.begin(), s - 1 );
-	return static_cast<nv::size_t>( s - buffer.begin() );
-}
-
-nv::size_t nv::uint32_to_buffer( array_ref< char > buffer, uint32 n )
+	return static_cast<nv::uint32>( s - buffer.begin() );
+}
+
+nv::uint32 nv::uint32_to_buffer( array_ref< char > buffer, uint32 n )
 {
 	if ( buffer.size() < 2 ) return 0;
@@ -84,8 +84,8 @@
 	*s = '\0';
 	string_reverse( buffer.begin(), s - 1 );
-	return static_cast<nv::size_t>( s - buffer.begin() );
-}
-
-nv::size_t nv::uint64_to_buffer( array_ref< char > buffer, uint64 n )
+	return static_cast<nv::uint32>( s - buffer.begin() );
+}
+
+nv::uint32 nv::uint64_to_buffer( array_ref< char > buffer, uint64 n )
 {
 	if ( buffer.size() < 2 ) return 0;
@@ -100,8 +100,8 @@
 	*s = '\0';
 	string_reverse( buffer.begin(), s - 1 );
-	return static_cast<nv::size_t>( s - buffer.begin() );
-}
-
-nv::size_t nv::f32_to_buffer( array_ref< char > buffer, f32 n )
+	return static_cast<nv::uint32>( s - buffer.begin() );
+}
+
+nv::uint32 nv::f32_to_buffer( array_ref< char > buffer, f32 n )
 {
 #if NV_COMPILER == NV_MSVC
@@ -110,8 +110,8 @@
 	int result = snprintf( buffer.data(), buffer.size(), "%.*g", 6, n );
 #endif
-	return static_cast<nv::size_t>( result > 0 ? result : 0 );
-}
-
-nv::size_t nv::f64_to_buffer( array_ref< char > buffer, f64 n )
+	return static_cast<nv::uint32>( result > 0 ? result : 0 );
+}
+
+nv::uint32 nv::f64_to_buffer( array_ref< char > buffer, f64 n )
 {
 #if NV_COMPILER == NV_MSVC
@@ -120,5 +120,5 @@
 	int result = snprintf( buffer.data(), buffer.size(), "%.*g", 6, n );
 #endif
-	return static_cast<nv::size_t>( result > 0 ? result : 0 );
+	return static_cast<nv::uint32>( result > 0 ? result : 0 );
 }
 
