Silencing a compiler warning ("warning: moving a temporary object
prevents copy elision")
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
SnapContext snapc;
if (io_context->write_snap_context()) {
auto write_snap_context = *io_context->write_snap_context();
- snapc = std::move(SnapContext(write_snap_context.first,
- {write_snap_context.second.begin(),
- write_snap_context.second.end()}));
+ snapc = SnapContext(write_snap_context.first,
+ {write_snap_context.second.begin(),
+ write_snap_context.second.end()});
}
m_image_ctx->image_lock.lock_shared();