Doing these conversions through a union is not safe either but more to the point, it isn't what's happening here.

This commit is contained in:
Steve Checkoway
2006-11-01 11:19:52 +00:00
parent e3e5cf77e5
commit cf3a76b600
-2
View File
@@ -161,8 +161,6 @@ ConvertValueHelper<TO, FROM> ConvertValue( FROM *pValue )
* that the memory location is being added to, but the value is stored in a register,
* and breaking aliasing rules means the compiler doesn't know that the register
* value is invalid.)
*
* Always do these conversions through a union.
*/
template<typename T>
static inline void enum_add( T &val, int iAmt )