summaryrefslogtreecommitdiff
path: root/src/mongo/util/safe_num-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/safe_num-inl.h')
-rw-r--r--src/mongo/util/safe_num-inl.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mongo/util/safe_num-inl.h b/src/mongo/util/safe_num-inl.h
index 80ece09d56d..1dc1dcbe785 100644
--- a/src/mongo/util/safe_num-inl.h
+++ b/src/mongo/util/safe_num-inl.h
@@ -60,20 +60,28 @@ namespace mongo {
return *this = addInternal(*this, rhs);
}
- inline SafeNum SafeNum::operator&(const SafeNum& rhs) const {
+ inline SafeNum SafeNum::bitAnd(const SafeNum& rhs) const {
return andInternal(*this, rhs);
}
+ inline SafeNum SafeNum::operator&(const SafeNum& rhs) const {
+ return bitAnd(rhs);
+ }
+
inline SafeNum& SafeNum::operator&=(const SafeNum& rhs) {
- return *this = andInternal(*this, rhs);
+ return *this = bitAnd(rhs);
}
- inline SafeNum SafeNum::operator|(const SafeNum& rhs) const {
+ inline SafeNum SafeNum::bitOr(const SafeNum& rhs) const {
return orInternal(*this, rhs);
}
+ inline SafeNum SafeNum::operator|(const SafeNum& rhs) const {
+ return bitOr(rhs);
+ }
+
inline SafeNum& SafeNum::operator|=(const SafeNum& rhs) {
- return *this = orInternal(*this, rhs);
+ return *this = bitOr(rhs);
}
inline bool SafeNum::isValid() const {