diff --git a/include/pqxx/except.hxx b/include/pqxx/except.hxx index 0f6dfc7fc..39e0ac109 100644 --- a/include/pqxx/except.hxx +++ b/include/pqxx/except.hxx @@ -137,8 +137,8 @@ class PQXX_LIBEXPORT sql_error : public failure public: explicit sql_error( - std::string whatarg = "", std::string const &Q = "", - char const sqlstate[] = nullptr + std::string const &whatarg = "", std::string Q = "", + char const *sqlstate = nullptr #if defined(PQXX_HAVE_SOURCE_LOCATION) , std::source_location = std::source_location::current() diff --git a/include/pqxx/row.hxx b/include/pqxx/row.hxx index ad48f50ca..a63b83d10 100644 --- a/include/pqxx/row.hxx +++ b/include/pqxx/row.hxx @@ -215,7 +215,7 @@ public: protected: friend class const_row_iterator; friend class result; - row(result const &r, result_size_type index, size_type cols) noexcept; + row(result r, result_size_type index, size_type cols) noexcept; /// Throw @ref usage_error if row size is not `expected`. void check_size(size_type expected) const diff --git a/src/except.cxx b/src/except.cxx index a8ca02df3..b5cd16ae2 100644 --- a/src/except.cxx +++ b/src/except.cxx @@ -83,20 +83,19 @@ pqxx::variable_set_to_null::variable_set_to_null( pqxx::sql_error::sql_error( - std::string whatarg, std::string const &Q, char const sqlstate[] + std::string const &whatarg, std::string Q, char const *sqlstate #if defined(PQXX_HAVE_SOURCE_LOCATION) , std::source_location loc #endif ) : - failure{ - std::move(whatarg) + failure{whatarg #if defined(PQXX_HAVE_SOURCE_LOCATION) , loc #endif }, - m_query{Q}, + m_query{std::move(Q)}, m_sqlstate{sqlstate ? sqlstate : ""} {} diff --git a/src/row.cxx b/src/row.cxx index 70519bac7..289685af8 100644 --- a/src/row.cxx +++ b/src/row.cxx @@ -28,8 +28,8 @@ extern "C" pqxx::row::row( - result const &r, result::size_type index, size_type cols) noexcept : - m_result{r}, m_index{index}, m_end{cols} + result r, result::size_type index, size_type cols) noexcept : + m_result{std::move(r)}, m_index{index}, m_end{cols} {}