[Orxonox-commit 702] r3234 - trunk/src/util

rgrieder at orxonox.net rgrieder at orxonox.net
Fri Jun 26 11:46:17 CEST 2009


Author: rgrieder
Date: 2009-06-26 11:46:17 +0200 (Fri, 26 Jun 2009)
New Revision: 3234

Modified:
   trunk/src/util/Convert.h
Log:
Using enum instead of a const bool to ensure the variable doesn't get linked (though there shouldn't be any compiler anymore that does this).

Modified: trunk/src/util/Convert.h
===================================================================
--- trunk/src/util/Convert.h	2009-06-26 09:42:34 UTC (rev 3233)
+++ trunk/src/util/Convert.h	2009-06-26 09:46:17 UTC (rev 3234)
@@ -236,11 +236,11 @@
     template <class FromType, class ToType>
     struct ConverterExplicit
     {
+        enum { probe = ImplicitConversion<FromType, ToType>::exists };
         FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             // Try implict cast and probe first. If a simple cast is not possible, it will not compile
             // We therefore have to out source it into another template function
-            const bool probe = ImplicitConversion<FromType, ToType>::exists;
             return convertImplicitely(output, input, detail::Int2Type<probe>());
         }
     };




More information about the Orxonox-commit mailing list