fix VC6 internal compiler error
This commit is contained in:
@@ -140,16 +140,16 @@ inline float froundf( const float f, const float fRoundInterval )
|
||||
template<typename T>
|
||||
static inline void enum_add( T &val, int iAmt )
|
||||
{
|
||||
union conv
|
||||
{
|
||||
T value;
|
||||
int i;
|
||||
conv( T v ):value(v) { }
|
||||
};
|
||||
union conv
|
||||
{
|
||||
T value;
|
||||
int i;
|
||||
};
|
||||
|
||||
conv c( val );
|
||||
c.i += iAmt;
|
||||
val = c.value;
|
||||
conv c;
|
||||
c.value = val;
|
||||
c.i += iAmt;
|
||||
val = c.value;
|
||||
}
|
||||
|
||||
// Move val toward other_val by to_move.
|
||||
|
||||
@@ -163,7 +163,7 @@ void ScreenSetTime::ChangeSelection( int iDirection )
|
||||
{
|
||||
// set new value of m_Selection
|
||||
SetTimeSelection OldSelection = m_Selection;
|
||||
enum_add( m_Selection, iDirection );
|
||||
enum_add<SetTimeSelection>( m_Selection, iDirection );
|
||||
|
||||
CLAMP( (int&)m_Selection, 0, NUM_SET_TIME_SELECTIONS-1 );
|
||||
if( iDirection != 0 && m_Selection == OldSelection )
|
||||
|
||||
Reference in New Issue
Block a user