diff --git a/misc.h b/misc.h index f29aa837..2b326dd6 100644 --- a/misc.h +++ b/misc.h @@ -299,7 +299,7 @@ template inline bool SafeConvert(T1 from, T2 &to) { to = (T2)from; - if ((T2)from != to || (from > 0) != (to > 0)) + if (from != to || (from > 0) != (to > 0)) return false; return true; }