diff --git a/cpp/src/aggregation/result_cache.cpp b/cpp/src/aggregation/result_cache.cpp index fb235d2bbe6..f35c05349b0 100644 --- a/cpp/src/aggregation/result_cache.cpp +++ b/cpp/src/aggregation/result_cache.cpp @@ -54,7 +54,7 @@ std::unique_ptr result_cache::release_result(size_t col_idx, aggregation auto result_it = _cache[col_idx].find(agg); std::unique_ptr result = std::move(result_it->second.second); _cache[col_idx].erase(result_it); - return std::move(result); + return result; } } // namespace detail diff --git a/cpp/src/comms/ipc/ipc.cpp b/cpp/src/comms/ipc/ipc.cpp index 1e70c05e180..21944f1354f 100644 --- a/cpp/src/comms/ipc/ipc.cpp +++ b/cpp/src/comms/ipc/ipc.cpp @@ -10,7 +10,7 @@ arrow::Result> CudaMessageReader::ReadNextM if (host_schema_reader_ != nullptr) { auto message = arrow::ipc::ReadMessage(host_schema_reader_); host_schema_reader_ = nullptr; - if (message.ok() && *message != nullptr) { return std::move(message); } + if (message.ok() && *message != nullptr) { return message; } } return std::move(arrow::ipc::ReadMessage(stream_, arrow::default_memory_pool())); }