Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1746


Ignore:
Timestamp:
Sep 9, 2008, 12:36:31 AM (16 years ago)
Author:
rgrieder
Message:

Gcc detected a few typos.

Location:
code/branches/core3/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/util/Convert.h

    r1745 r1746  
    153153    };
    154154
    155     template <int asdf>
    156     class ExplicitConversion<float, int, asdf>
    157     {
    158     private:
    159         static float objectFromType; // helper object to handle private c'tor and d'tor
    160         static int   objectToType;   // helper object to handle private c'tor and d'tor
    161     public:
    162         enum { exists = sizeof(explicitConversion(&objectToType, objectFromType)) == sizeof(VerySmallStruct) };
    163         static void test() { TemplateDebugger<sizeof(explicitConversion(&objectToType, objectFromType)), sizeof(VerySmallStruct)>::debug(1,2); }
    164     };
     155    //template <int asdf>
     156    //class ExplicitConversion<float, int, asdf>
     157    //{
     158    //private:
     159    //    static float objectFromType; // helper object to handle private c'tor and d'tor
     160    //    static int   objectToType;   // helper object to handle private c'tor and d'tor
     161    //public:
     162    //    enum { exists = sizeof(explicitConversion(&objectToType, objectFromType)) == sizeof(VerySmallStruct) };
     163    //    static void test() { TemplateDebugger<sizeof(explicitConversion(&objectToType, objectFromType)), sizeof(VerySmallStruct)>::debug(1,2); }
     164    //};
    165165
    166166    // checks for conversion via istringstream
     
    239239///////////////////////
    240240
    241 // template that is used when no explicit template specialisation is available
    242 template <class ToType, class FromType>
    243 struct ConverterSpecialised
    244 {
    245     static bool convert(ToType* output, const FromType& input)
    246     {
    247         // check for explicit conversion via function overloading
    248         return conversion::convert(output, input,
    249             conversion::ExplicitPossible<ExplicitConversion<FromType, ToType>::exists>());
    250     }
    251 };
    252 
    253241namespace conversion
    254242{
     
    271259        //return ConverterSpecialised<ToType, FromType>::convert(output, input);
    272260    }
    273 
    274 
     261}
     262
     263// template that is used when no explicit template specialisation is available
     264template <class ToType, class FromType>
     265struct ConverterSpecialised
     266{
     267    static bool convert(ToType* output, const FromType& input)
     268    {
     269        // check for explicit conversion via function overloading
     270        return conversion::convert(output, input,
     271            conversion::ExplicitPossible<ExplicitConversion<FromType, ToType>::exists>());
     272    }
     273};
     274
     275namespace conversion
     276{
    275277    /////////////////
    276278    //Implicit Cast//
  • code/branches/core3/src/util/Math.cc

    r1745 r1746  
    233233    return false;
    234234}
     235
Note: See TracChangeset for help on using the changeset viewer.