Backed out commit d2686acc10. Its not clear it was safe to clear the warning this way
parent
789aacd4d3
commit
17fea9df2a
2
misc.h
2
misc.h
|
|
@ -299,7 +299,7 @@ template <class T1, class T2>
|
||||||
inline bool SafeConvert(T1 from, T2 &to)
|
inline bool SafeConvert(T1 from, T2 &to)
|
||||||
{
|
{
|
||||||
to = (T2)from;
|
to = (T2)from;
|
||||||
if ((T2)from != to || (from > 0) != (to > 0))
|
if (from != to || (from > 0) != (to > 0))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue