Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3234 for code/trunk/src/util


Ignore:
Timestamp:
Jun 26, 2009, 11:46:17 AM (15 years ago)
Author:
rgrieder
Message:

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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/Convert.h

    r3232 r3234  
    237237    struct ConverterExplicit
    238238    {
     239        enum { probe = ImplicitConversion<FromType, ToType>::exists };
    239240        FORCEINLINE static bool convert(ToType* output, const FromType& input)
    240241        {
    241242            // Try implict cast and probe first. If a simple cast is not possible, it will not compile
    242243            // We therefore have to out source it into another template function
    243             const bool probe = ImplicitConversion<FromType, ToType>::exists;
    244244            return convertImplicitely(output, input, detail::Int2Type<probe>());
    245245        }
Note: See TracChangeset for help on using the changeset viewer.