summaryrefslogtreecommitdiff
path: root/absl/random/internal/nanobenchmark.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/random/internal/nanobenchmark.cc')
-rw-r--r--absl/random/internal/nanobenchmark.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/random/internal/nanobenchmark.cc b/absl/random/internal/nanobenchmark.cc
index c9181813..0f31a7d5 100644
--- a/absl/random/internal/nanobenchmark.cc
+++ b/absl/random/internal/nanobenchmark.cc
@@ -361,7 +361,7 @@ void CountingSort(T* values, size_t num_values) {
// Write that many copies of each unique value to the array.
T* ABSL_RANDOM_INTERNAL_RESTRICT p = values;
for (const auto& value_count : unique) {
- std::fill(p, p + value_count.second, value_count.first);
+ std::fill_n(p, value_count.second, value_count.first);
p += value_count.second;
}
ABSL_RAW_CHECK(p == values + num_values, "Did not produce enough output");