Changeset 3192 for code/branches/pch/src/util
- Timestamp:
- Jun 18, 2009, 10:00:15 AM (16 years ago)
- Location:
- code/branches/pch/src/util
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/util/Convert.h
r3189 r3192 307 307 { 308 308 return ConverterExplicit<FromType, ToType>::convert(output, input); 309 }310 311 // For compatibility reasons. The same, but with capital ConvertValue312 template<class FromType, class ToType>313 FORCEINLINE bool ConvertValue(ToType* output, const FromType& input)314 {315 return convertValue(output, input);316 309 } 317 310 … … 372 365 FORCEINLINE std::string convertToString(FromType value) 373 366 { 374 return getConvertedValue<FromType, std::string>(value);367 return getConvertedValue<FromType, std::string>(value); 375 368 } 376 369 … … 379 372 FORCEINLINE ToType convertFromString(std::string str) 380 373 { 381 return getConvertedValue<std::string, ToType>(str);374 return getConvertedValue<std::string, ToType>(str); 382 375 } 383 376 -
code/branches/pch/src/util/Math.h
r3163 r3192 229 229 inline float rnd() 230 230 { 231 return rand() / (RAND_MAX + 1.0 );231 return rand() / (RAND_MAX + 1.0f); 232 232 } 233 233 … … 256 256 inline float rndsgn() 257 257 { 258 return ((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0258 return static_cast<float>((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0 259 259 } 260 260
Note: See TracChangeset
for help on using the changeset viewer.