Skip to content

Commit 9154e8a

Browse files
jgautier-anssifabienfl-orc
authored andcommitted
OrcLib: Buffer: InnerStore: fix method swap
1 parent c3c36e7 commit 9154e8a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/OrcLib/Buffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ class Buffer
385385
friend void swap(InnerStore& left, InnerStore& right) noexcept
386386
{
387387
std::array<_T, _DeclElts> temp;
388-
std::copy(std::begin(left.m_Elts), std::end(left.m_Elts), std::begin(temp));
389-
std::copy(std::begin(right.m_Elts), std::end(right.m_Elts), std::begin(temp));
390-
std::copy(std::begin(temp), std::end(temp), std::begin(temp));
388+
std::copy(std::cbegin(left.m_Elts), std::cend(left.m_Elts), std::begin(temp));
389+
std::copy(std::cbegin(right.m_Elts), std::cend(right.m_Elts), std::begin(left.m_Elts));
390+
std::copy(std::cbegin(temp), std::cend(temp), std::begin(right.m_Elts));
391391
}
392392

393393
constexpr InnerStore() = default;

0 commit comments

Comments
 (0)