- Timestamp:
- Mar 30, 2008, 4:46:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/util/Convert.h
r931 r958 541 541 }; 542 542 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 555 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(void*) 556 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(int) 557 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned int) 558 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(char) 559 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned char) 560 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(short) 561 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned short) 562 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(long) 563 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(unsigned long) 564 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(float) 565 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(double) 566 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(long double) 567 CONVERT_VALUE_AND_RETURN_SPECIALIZATION(bool) 568 543 569 #endif /* _Convert_H__ */
Note: See TracChangeset
for help on using the changeset viewer.