Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 958 for code/branches/core2


Ignore:
Timestamp:
Mar 30, 2008, 4:46:26 PM (17 years ago)
Author:
landauf
Message:

this is a try to avoid some compiler warnings on tardis

File:
1 edited

Legend:

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

    r931 r958  
    541541};
    542542
     543////////////////////////////////////////////
     544// Some specializations to avoid warnings //
     545////////////////////////////////////////////
     546#define CONVERT_VALUE_AND_RETURN_SPECIALIZATION(ToType) \
     547  template<typename FromType> \
     548  static ToType ConvertValueAndReturn(const FromType& input) \
     549  { \
     550    ToType output; \
     551    ConvertValue(&output, input); \
     552    return output; \
     553  }
     554
     555CONVERT_VALUE_AND_RETURN_SPECIALIZATION(void*)
     556CONVERT_VALUE_AND_RETURN_SPECIALIZATION(int)
     557CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned int)
     558CONVERT_VALUE_AND_RETURN_SPECIALIZATION(char)
     559CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned char)
     560CONVERT_VALUE_AND_RETURN_SPECIALIZATION(short)
     561CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned short)
     562CONVERT_VALUE_AND_RETURN_SPECIALIZATION(long)
     563CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned long)
     564CONVERT_VALUE_AND_RETURN_SPECIALIZATION(float)
     565CONVERT_VALUE_AND_RETURN_SPECIALIZATION(double)
     566CONVERT_VALUE_AND_RETURN_SPECIALIZATION(long double)
     567CONVERT_VALUE_AND_RETURN_SPECIALIZATION(bool)
     568
    543569#endif /* _Convert_H__ */
Note: See TracChangeset for help on using the changeset viewer.