From a26fc02d1ea9a2f0770c1297db0a049b9dd4b941 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:32:09 -0400 Subject: Prefer copy_n and fill_n over copy and fill where appropriate. This lets us avoid having to do the addition manually. --- absl/strings/internal/charconv_bigint.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'absl/strings/internal/charconv_bigint.cc') diff --git a/absl/strings/internal/charconv_bigint.cc b/absl/strings/internal/charconv_bigint.cc index 282b639e..552fecc6 100644 --- a/absl/strings/internal/charconv_bigint.cc +++ b/absl/strings/internal/charconv_bigint.cc @@ -296,9 +296,9 @@ template std::min(n / kLargePowerOfFiveStep, kLargestPowerOfFiveIndex); if (first_pass) { // just copy, rather than multiplying by 1 - std::copy( + std::copy_n( LargePowerOfFiveData(big_power), - LargePowerOfFiveData(big_power) + LargePowerOfFiveSize(big_power), + LargePowerOfFiveSize(big_power), answer.words_); answer.size_ = LargePowerOfFiveSize(big_power); first_pass = false; -- cgit v1.2.3