diff options
author | Yuriy Chernyshov <thegeorg@yandex-team.com> | 2023-02-27 00:39:06 +0300 |
---|---|---|
committer | Yuriy Chernyshov <thegeorg@yandex-team.com> | 2023-02-27 00:39:06 +0300 |
commit | f8d47820dcc2c75a7422c11453df591b2ffc163f (patch) | |
tree | 17481bfb0f77be7914e95e3212a2af9ce8c1b816 /absl | |
parent | f2b52372f7f553a4e9b2558daf2d14d3adf484da (diff) |
Fix compiling int128.cc against certain STLs
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..f09fcca3 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(1u, 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; } } |