diff options
author | Copybara-Service <copybara-worker@google.com> | 2023-03-01 21:29:47 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-01 21:29:47 -0800 |
commit | a53d0916ecf559670aeaaab9ab4ed3268b0b84fc (patch) | |
tree | cf80dc0a117877d2805984d53e0d7e0c005a48fd /absl | |
parent | 02f4b999763c2c71b7a5e00d1c4b2cf6317eecae (diff) | |
parent | f8d47820dcc2c75a7422c11453df591b2ffc163f (diff) |
Merge pull request #1409 from georgthegreat:explicit-inserts
PiperOrigin-RevId: 513430584
Change-Id: I944a4868565564f32133dbff8b7a952221bb8b88
Diffstat (limited to 'absl')
-rw-r--r-- | absl/numeric/int128.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/absl/numeric/int128.cc b/absl/numeric/int128.cc index 3f5d26c9..6ffe43d5 100644 --- a/absl/numeric/int128.cc +++ b/absl/numeric/int128.cc @@ -216,9 +216,9 @@ std::ostream& operator<<(std::ostream& os, uint128 v) { } else if (adjustfield == std::ios::internal && (flags & std::ios::showbase) && (flags & std::ios::basefield) == std::ios::hex && v != 0) { - rep.insert(2, count, os.fill()); + rep.insert(size_t{2}, count, os.fill()); } else { - rep.insert(0, count, os.fill()); + rep.insert(size_t{0}, count, os.fill()); } } @@ -314,16 +314,16 @@ std::ostream& operator<<(std::ostream& os, int128 v) { break; case std::ios::internal: if (print_as_decimal && (rep[0] == '+' || rep[0] == '-')) { - rep.insert(1, count, os.fill()); + rep.insert(size_t{1}, count, os.fill()); } else if ((flags & std::ios::basefield) == std::ios::hex && (flags & std::ios::showbase) && v != 0) { - rep.insert(2, count, os.fill()); + rep.insert(size_t{2}, count, os.fill()); } else { - rep.insert(0, count, os.fill()); + rep.insert(size_t{0}, count, os.fill()); } break; default: // std::ios::right - rep.insert(0, count, os.fill()); + rep.insert(size_t{0}, count, os.fill()); break; } } |