You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/04/02 21:17:41 UTC

[kudu] 02/04: client: remove a warning

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

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 49f019668c1d148565e85a8b1b396b018d932a9f
Author: Adar Dembo <ad...@cloudera.com>
AuthorDate: Mon Apr 1 20:45:30 2019 -0700

    client: remove a warning
    
      ../../src/kudu/client/schema.cc:624:27: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
                                std::move(comment ? boost::optional<string>(*comment) : boost::none));
                                ^
      ../../src/kudu/client/schema.cc:624:27: note: remove std::move call here
                                std::move(comment ? boost::optional<string>(*comment) : boost::none));
                                ^~~~~~~~~~                                                         ~
      1 warning generated.
    
    Change-Id: I15b60c8a4b245fa694a1abc5c60bced66ed3039b
    Reviewed-on: http://gerrit.cloudera.org:8080/12909
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/client/schema.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/client/schema.cc b/src/kudu/client/schema.cc
index faa7c53..d6b90d2 100644
--- a/src/kudu/client/schema.cc
+++ b/src/kudu/client/schema.cc
@@ -596,7 +596,7 @@ KuduColumnSchema::KuduColumnSchema(const string &name,
                           is_nullable,
                           default_value, default_value, attr_private,
                           type_attr_private,
-                          std::move(comment ? boost::optional<string>(*comment) : boost::none));
+                          comment ? boost::optional<string>(*comment) : boost::none);
 }
 
 KuduColumnSchema::KuduColumnSchema(const KuduColumnSchema& other)