]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/bit_vector.hpp: do not move a temporary object
authorKefu Chai <kchai@redhat.com>
Sat, 11 Jan 2020 14:10:47 +0000 (22:10 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 11 Jan 2020 15:16:35 +0000 (23:16 +0800)
commitac7a398f6a6bcb8a11b2f42cc4c5ce30d7122db3
tree78401fbf4e60f4d8e426431267e86a8427cc3f72
parent9d3a704c9d893b47a1f83b9428d0c3a4feef9a7c
common/bit_vector.hpp: do not move a temporary object

this change also silences a waring from clang:

src/common/bit_vector.hpp:278:21: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
      m_data.append(std::move(buffer::ptr(buffer_size - m_data.length())));
                    ^
../src/common/bit_vector.hpp:278:21: note: remove std::move call here
      m_data.append(std::move(buffer::ptr(buffer_size - m_data.length())));
                    ^~~~~~~~~~                                          ~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/bit_vector.hpp