Browse Source

Fix use of compiler-specific details

Marc Legendre 9 years ago
parent
commit
2aeaa96a27

+ 2 - 2
Source/BansheeCore/Include/BsMaterialParams.h

@@ -113,7 +113,7 @@ namespace BansheeEngine
 			if (result != GetParamResult::Success)
 				return;
 
-			const GpuParamDataTypeInfo& typeInfo = GpuParams::PARAM_SIZES[dataType];
+			const GpuParamDataTypeInfo& typeInfo = GpuParams::PARAM_SIZES.lookup[dataType];
 			UINT32 paramTypeSize = typeInfo.numColumns * typeInfo.numRows * typeInfo.baseTypeSize;
 			output = *(T*)(mDataParamsBuffer[param->index + arrayIdx * paramTypeSize]);
 
@@ -140,7 +140,7 @@ namespace BansheeEngine
 			if (result != GetParamResult::Success)
 				return;
 
-			const GpuParamDataTypeInfo& typeInfo = GpuParams::PARAM_SIZES[dataType];
+			const GpuParamDataTypeInfo& typeInfo = GpuParams::PARAM_SIZES.lookup[dataType];
 			UINT32 paramTypeSize = typeInfo.numColumns * typeInfo.numRows * typeInfo.baseTypeSize;
 
 			memcpy(&mDataParamsBuffer[param->index + arrayIdx * paramTypeSize], input, sizeof(paramTypeSize));

+ 2 - 2
Source/BansheeCore/Include/BsResourceHandle.h

@@ -290,7 +290,7 @@ namespace BansheeEngine
 		 * @note	Handle will take ownership of the provided resource pointer, so make sure you don't delete it elsewhere.
 		 */
 		explicit TResourceHandle(T* ptr, const String& uuid)
-			:TResourceHandleBase()
+			:TResourceHandleBase<WeakHandle>()
 		{
 			this->mData = bs_shared_ptr_new<ResourceHandleData>();
 			this->addRef();
@@ -391,4 +391,4 @@ namespace BansheeEngine
 	}
 
 	/** @} */
-}
+}