C++: use the const version of begin and end from SharedVector::clear

This commit is contained in:
Olivier Goffart 2021-11-26 15:09:32 +01:00
parent d9637816bb
commit c15a59892a

View file

@ -133,7 +133,7 @@ struct SharedVector
if (inner->refcount != 1) { if (inner->refcount != 1) {
*this = SharedVector(); *this = SharedVector();
} else { } else {
auto b = begin(), e = end(); auto b = cbegin(), e = cend();
inner->size = 0; inner->size = 0;
for (auto it = b; it < e; ++it) { for (auto it = b; it < e; ++it) {
it->~T(); it->~T();