summaryrefslogtreecommitdiff
path: root/absl/time
diff options
context:
space:
mode:
authorGravatar Rose <83477269+AtariDreams@users.noreply.github.com>2023-03-16 17:32:09 -0400
committerGravatar Rose <83477269+AtariDreams@users.noreply.github.com>2023-04-19 13:35:57 -0400
commita26fc02d1ea9a2f0770c1297db0a049b9dd4b941 (patch)
tree1107f6d9ab367d24ab7975511329a845a30637ca /absl/time
parente85868cbef04e8e8ff518e09b6af3970bbe5d2eb (diff)
Prefer copy_n and fill_n over copy and fill where appropriate.
This lets us avoid having to do the addition manually.
Diffstat (limited to 'absl/time')
-rw-r--r--absl/time/internal/cctz/src/time_zone_fixed.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_fixed.cc b/absl/time/internal/cctz/src/time_zone_fixed.cc
index f2b3294e..e09654ea 100644
--- a/absl/time/internal/cctz/src/time_zone_fixed.cc
+++ b/absl/time/internal/cctz/src/time_zone_fixed.cc
@@ -105,7 +105,7 @@ std::string FixedOffsetToName(const seconds& offset) {
offset_minutes %= 60;
const std::size_t prefix_len = sizeof(kFixedZonePrefix) - 1;
char buf[prefix_len + sizeof("-24:00:00")];
- char* ep = std::copy(kFixedZonePrefix, kFixedZonePrefix + prefix_len, buf);
+ char* ep = std::copy_n(kFixedZonePrefix, prefix_len, buf);
*ep++ = sign;
ep = Format02d(ep, offset_hours);
*ep++ = ':';