This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 81bd4bed [c++] Remove one std::move avoiding 'pessimizing move' 
(closes #362) (#363)
81bd4bed is described below

commit 81bd4bed503845d3d9b0f1e0de66ea87fb57795b
Author: Dirk Eddelbuettel <[email protected]>
AuthorDate: Fri Jan 12 19:22:22 2024 -0600

    [c++] Remove one std::move avoiding 'pessimizing move' (closes #362) (#363)
    
    As discussed in #362, we see a nag from `g++` 13.2.0 about a
    'pessimizing move' from this `std::move` and the compiler itself
    suggests removing it. Did so, and did not tickle a valgrind issue is
    casual testing.
---
 src/nanoarrow/nanoarrow_testing.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nanoarrow/nanoarrow_testing.hpp 
b/src/nanoarrow/nanoarrow_testing.hpp
index 638e759c..0b434e8c 100644
--- a/src/nanoarrow/nanoarrow_testing.hpp
+++ b/src/nanoarrow/nanoarrow_testing.hpp
@@ -467,7 +467,7 @@ class TestingJSONWriter {
       NANOARROW_RETURN_NOT_OK(
           WriteColumn(dictionary_output, field->dictionary, 
value->dictionary));
       dictionaries_.RecordArray(field->dictionary, value->dictionary->length,
-                                std::move(dictionary_output.str()));
+                                dictionary_output.str());
     }
 
     return NANOARROW_OK;

Reply via email to