summaryrefslogtreecommitdiff
path: root/absl/numeric/int128.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2017-12-05 10:58:48 -0800
committerGravatar Alex Strelnikov <strel@google.com>2017-12-06 10:09:02 -0500
commit1b8dacca622ad547b08bccf523529ef09e2d581f (patch)
treeee426400223f85dbcf4ee3515285eb0d9091100e /absl/numeric/int128.cc
parentf4f91f421635276ba1eb4580c117edc38389e54b (diff)
Changes imported from Abseil "staging" branch:
- 536d004b7e2d48927a5f82e71e9e3a0a9afedbc8 Change uint128 parameters to pass by value. by Alex Strelnikov <strel@google.com> GitOrigin-RevId: 536d004b7e2d48927a5f82e71e9e3a0a9afedbc8 Change-Id: I9c5e73ce06c8423a27ec7bff2c4accc434e99cb2
Diffstat (limited to 'absl/numeric/int128.cc')
-rw-r--r--absl/numeric/int128.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/absl/numeric/int128.cc b/absl/numeric/int128.cc
index 73a8f737..00bf7f47 100644
--- a/absl/numeric/int128.cc
+++ b/absl/numeric/int128.cc
@@ -124,22 +124,22 @@ uint128::uint128(float v) : uint128(Initialize128FromFloat(v)) {}
uint128::uint128(double v) : uint128(Initialize128FromFloat(v)) {}
uint128::uint128(long double v) : uint128(Initialize128FromFloat(v)) {}
-uint128& uint128::operator/=(const uint128& divisor) {
+uint128& uint128::operator/=(uint128 other) {
uint128 quotient = 0;
uint128 remainder = 0;
- DivModImpl(*this, divisor, &quotient, &remainder);
+ DivModImpl(*this, other, &quotient, &remainder);
*this = quotient;
return *this;
}
-uint128& uint128::operator%=(const uint128& divisor) {
+uint128& uint128::operator%=(uint128 other) {
uint128 quotient = 0;
uint128 remainder = 0;
- DivModImpl(*this, divisor, &quotient, &remainder);
+ DivModImpl(*this, other, &quotient, &remainder);
*this = remainder;
return *this;
}
-std::ostream& operator<<(std::ostream& o, const uint128& b) {
+std::ostream& operator<<(std::ostream& o, uint128 b) {
std::ios_base::fmtflags flags = o.flags();
// Select a divisor which is the largest power of the base < 2^64.