summaryrefslogtreecommitdiff
path: root/absl/time/internal
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-09-01 10:08:26 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-09-01 10:09:08 -0700
commitfa108c444f18f6345b78090af47ec5fb4a7c2c36 (patch)
treeb85fec244098d41964f1d2b5709c45bbd5638a2b /absl/time/internal
parent847fa56a5422c20a6f471e67ac0bca004ff5eac5 (diff)
Rollback of fix "unsafe narrowing" warnings in absl, 8/n.
Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in */internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 471561809 Change-Id: I7abd6d83706f5ca135f1ce3458192a498a6280b9
Diffstat (limited to 'absl/time/internal')
-rw-r--r--absl/time/internal/test_util.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/absl/time/internal/test_util.cc b/absl/time/internal/test_util.cc
index 4b7849c6..454b33a1 100644
--- a/absl/time/internal/test_util.cc
+++ b/absl/time/internal/test_util.cc
@@ -84,15 +84,14 @@ class TestZoneInfoSource : public cctz::ZoneInfoSource {
: data_(data), end_(data + size) {}
std::size_t Read(void* ptr, std::size_t size) override {
- const std::size_t len =
- std::min(size, static_cast<std::size_t>(end_ - data_));
+ const std::size_t len = std::min<std::size_t>(size, end_ - data_);
memcpy(ptr, data_, len);
data_ += len;
return len;
}
int Skip(std::size_t offset) override {
- data_ += std::min(offset, static_cast<std::size_t>(end_ - data_));
+ data_ += std::min<std::size_t>(offset, end_ - data_);
return 0;
}