From ceeda2e337077b2edaf1af09cc4df2c30e8205a1 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 15 Apr 2014 20:05:17 -0700 Subject: Wouldn't it be nice to have some integers too? --- src/map/battle.t.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/battle.t.hpp') diff --git a/src/map/battle.t.hpp b/src/map/battle.t.hpp index 9685ae7..d3a7a9c 100644 --- a/src/map/battle.t.hpp +++ b/src/map/battle.t.hpp @@ -65,11 +65,11 @@ struct BCT }; constexpr -BCT operator & (BCT l, BCT r) { return {uint8_t(l.lo & r.lo), uint8_t(l.mid & r.mid), uint8_t(l.classic & r.classic), uint8_t(l.level & r.level), uint8_t(l.unused & r.unused) }; } +BCT operator & (BCT l, BCT r) { return {static_cast(l.lo & r.lo), static_cast(l.mid & r.mid), static_cast(l.classic & r.classic), static_cast(l.level & r.level), static_cast(l.unused & r.unused) }; } constexpr -BCT operator | (BCT l, BCT r) { return {uint8_t(l.lo | r.lo), uint8_t(l.mid | r.mid), uint8_t(l.classic | r.classic), uint8_t(l.level | r.level), uint8_t(l.unused | r.unused) }; } +BCT operator | (BCT l, BCT r) { return {static_cast(l.lo | r.lo), static_cast(l.mid | r.mid), static_cast(l.classic | r.classic), static_cast(l.level | r.level), static_cast(l.unused | r.unused) }; } constexpr -BCT operator ^ (BCT l, BCT r) { return {uint8_t(l.lo ^ r.lo), uint8_t(l.mid ^ r.mid), uint8_t(l.classic ^ r.classic), uint8_t(l.level ^ r.level), uint8_t(l.unused ^ r.unused) }; } +BCT operator ^ (BCT l, BCT r) { return {static_cast(l.lo ^ r.lo), static_cast(l.mid ^ r.mid), static_cast(l.classic ^ r.classic), static_cast(l.level ^ r.level), static_cast(l.unused ^ r.unused) }; } inline BCT& operator &= (BCT& l, BCT r) { return l = l & r; } inline -- cgit v1.2.3-60-g2f50