summaryrefslogtreecommitdiff
path: root/libpqpp/pq-prepared.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/pq-prepared.cpp')
-rw-r--r--libpqpp/pq-prepared.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-prepared.cpp b/libpqpp/pq-prepared.cpp
index 78ad285..83bfcd5 100644
--- a/libpqpp/pq-prepared.cpp
+++ b/libpqpp/pq-prepared.cpp
@@ -25,8 +25,8 @@ PQ::PreparedStatement::prepare() const
}
std::stringstream psql;
prepareSql(psql, sql);
- c->checkResultFree(
- PQprepare(c->conn, stmntName.c_str(), psql.str().c_str(), static_cast<int>(values.size()), nullptr),
+ c->checkResultFree(PQprepare(c->conn, stmntName.c_str(), std::move(psql).str().c_str(),
+ static_cast<int>(values.size()), nullptr),
PGRES_COMMAND_OK);
return (pstmt = c->preparedStatements.insert({hash, stmntName}).first->second.c_str());
}