Jelajahi Sumber

Minor fixes while trying out Clang compiler

BearishSun 10 tahun lalu
induk
melakukan
d85d7a3271

+ 2 - 2
BansheeUtility/Include/BsException.h

@@ -176,10 +176,10 @@ namespace BansheeEngine
 #ifndef BS_EXCEPT
 #define BS_EXCEPT(type, desc)	\
 		{                           \
-	static_assert((std::is_base_of<BansheeEngine::Exception, type##>::value), "Invalid exception type (" #type ") for BS_EXCEPT macro. It needs to derive from BansheeEngine::Exception."); \
+	static_assert((std::is_base_of<BansheeEngine::Exception, type>::value), "Invalid exception type (" #type ") for BS_EXCEPT macro. It needs to derive from BansheeEngine::Exception."); \
 	gCrashHandler().reportCrash(#type, desc, __PRETTY_FUNCTION__, __FILE__, __LINE__); \
 	PlatformUtility::terminate(true); \
-	throw type##(desc, __PRETTY_FUNCTION__, __FILE__, __LINE__); \
+	throw type(desc, __PRETTY_FUNCTION__, __FILE__, __LINE__); \
 	}
 #endif
 

+ 1 - 2
BansheeUtility/Include/BsRTTIPlainField.h

@@ -203,8 +203,7 @@ namespace BansheeEngine
 
 			if(arraySizeSetter.empty())
 			{
-				BS_EXCEPT(InternalErrorException, 
-					"Specified field (" + mName + ") has no array size setter.");
+				BS_EXCEPT(InternalErrorException, "Specified field (" + mName + ") has no array size setter.");
 			}
 
 			std::function<void(ObjectType*, UINT32)> f = any_cast<std::function<void(ObjectType*, UINT32)>>(arraySizeSetter);

+ 1 - 1
BansheeUtility/Include/BsRTTIType.h

@@ -621,7 +621,7 @@ namespace BansheeEngine
 		}
 
 		/** @copydoc RTTITypeBase::isDerivedFrom */
-		bool RTTITypeBase::isDerivedFrom(RTTITypeBase* base) override
+		bool isDerivedFrom(RTTITypeBase* base) override
 		{
 			assert(base != nullptr);
 

+ 2 - 2
BansheeUtility/Include/BsStringFormat.h

@@ -186,10 +186,10 @@ namespace BansheeEngine
 		template<class T> static std::string toString(const T& param) { return std::to_string(param); }
 
 		/**	Helper method that "converts" a narrow string to a narrow string (simply a pass through). */
-		template<> static std::string toString<std::string>(const std::string& param) { return param; }
+		template<> static std::string toString(const std::string& param) { return param; }
 
 		/**	Helper method that converts a Banshee narrow string to a standard narrow string. */
-		template<> static std::string toString<String>(const String& param)
+		template<> static std::string toString(const String& param)
 		{
 			return std::string(param.c_str());
 		}