diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-15 20:05:17 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-04-19 20:09:35 -0700 |
commit | ceeda2e337077b2edaf1af09cc4df2c30e8205a1 (patch) | |
tree | ab7a70020e1dcac9ee56531c1c5af9888989f4f3 /src/map/battle.t.hpp | |
parent | 147c3e9c891c12dbfd39b65ee0f5baddf5f81b14 (diff) | |
download | tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.gz tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.bz2 tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.tar.xz tmwa-ceeda2e337077b2edaf1af09cc4df2c30e8205a1.zip |
Wouldn't it be nice to have some integers too?
Diffstat (limited to 'src/map/battle.t.hpp')
-rw-r--r-- | src/map/battle.t.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<uint8_t>(l.lo & r.lo), static_cast<uint8_t>(l.mid & r.mid), static_cast<uint8_t>(l.classic & r.classic), static_cast<uint8_t>(l.level & r.level), static_cast<uint8_t>(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<uint8_t>(l.lo | r.lo), static_cast<uint8_t>(l.mid | r.mid), static_cast<uint8_t>(l.classic | r.classic), static_cast<uint8_t>(l.level | r.level), static_cast<uint8_t>(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<uint8_t>(l.lo ^ r.lo), static_cast<uint8_t>(l.mid ^ r.mid), static_cast<uint8_t>(l.classic ^ r.classic), static_cast<uint8_t>(l.level ^ r.level), static_cast<uint8_t>(l.unused ^ r.unused) }; } inline BCT& operator &= (BCT& l, BCT r) { return l = l & r; } inline |