diff options
-rw-r--r-- | libdbpp/column.h | 2 | ||||
-rw-r--r-- | libdbpp/selectcommand.cpp | 4 | ||||
-rw-r--r-- | libdbpp/selectcommand.h | 2 | ||||
m--------- | libdbpp/unittests/libdbpp-postgresql | 0 |
4 files changed, 4 insertions, 4 deletions
diff --git a/libdbpp/column.h b/libdbpp/column.h index ae7634f..94d597b 100644 --- a/libdbpp/column.h +++ b/libdbpp/column.h @@ -115,7 +115,7 @@ namespace DB { /// This column's name. const std::string name; }; - typedef std::shared_ptr<Column> ColumnPtr; + typedef std::unique_ptr<Column> ColumnPtr; } #endif diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp index 1e67ce6..96b3276 100644 --- a/libdbpp/selectcommand.cpp +++ b/libdbpp/selectcommand.cpp @@ -73,10 +73,10 @@ DB::SelectCommand::columnCount() const return columns->size(); } -DB::ColumnPtr +const DB::ColumnPtr & DB::SelectCommand::insertColumn(ColumnPtr col) { - return *columns->insert(col).first; + return *columns->insert(std::move(col)).first; } DB::RowBase::RowBase(SelectCommand * s) : diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h index 05ec2ce..2fb9253 100644 --- a/libdbpp/selectcommand.h +++ b/libdbpp/selectcommand.h @@ -128,7 +128,7 @@ namespace DB { protected: /// Helper function so clients need not know about boost::multi_index_container. - ColumnPtr insertColumn(ColumnPtr); + const ColumnPtr & insertColumn(ColumnPtr); class Columns; diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql -Subproject 36d1ebb68359d7faa194a1f62c17011b462a3a1 +Subproject a0cedddde5ad16e2b885d3dd0b57b3e613a796a |