diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-11-13 04:15:27 -0500 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-11-14 12:19:28 -0500 |
commit | 69ca48717ceb31e37e90276278362c809cf98cc6 (patch) | |
tree | bad0f56a81b0894ece1a03c3ff8f59c13b2771b0 /src | |
parent | 7bad78c2c83d73b7e0518f3e1b835f0157b80ec6 (diff) |
Implement prevector::fill once
Now that the implementation is identical, we can use a default value to
distinguish them.
Diffstat (limited to 'src')
-rw-r--r-- | src/prevector.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/prevector.h b/src/prevector.h index 7865299706..99e5751634 100644 --- a/src/prevector.h +++ b/src/prevector.h @@ -196,11 +196,7 @@ private: T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); } const T* item_ptr(difference_type pos) const { return is_direct() ? direct_ptr(pos) : indirect_ptr(pos); } - void fill(T* dst, ptrdiff_t count) { - std::fill_n(dst, count, T{}); - } - - void fill(T* dst, ptrdiff_t count, const T& value) { + void fill(T* dst, ptrdiff_t count, const T& value = T{}) { std::fill_n(dst, count, value); } |