Use Use templetized operations for Score and Value

Note that in value we leave two specialized functions
to allow adding an integer, we don't want to add this
as a template becasue we want to control implicit
conversions to integer of an enum.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-08-18 17:04:38 +01:00
parent 13bd0cff0d
commit 0e800c527a
2 changed files with 5 additions and 23 deletions

View File

@@ -137,6 +137,9 @@ inline void operator-- (T& d, int) { d = T(int(d) - 1); }
template<typename T>
inline void operator+= (T& d1, const T d2) { d1 = d1 + d2; }
template<typename T>
inline void operator-= (T& d1, const T d2) { d1 = d1 - d2; }
template<typename T>
inline void operator*= (T& d, int i) { d = T(int(d) * i); }