summaryrefslogtreecommitdiff
path: root/libpqpp/pq-modifycommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpqpp/pq-modifycommand.cpp')
-rw-r--r--libpqpp/pq-modifycommand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/pq-modifycommand.cpp b/libpqpp/pq-modifycommand.cpp
index 38c10f6..b29fda7 100644
--- a/libpqpp/pq-modifycommand.cpp
+++ b/libpqpp/pq-modifycommand.cpp
@@ -15,8 +15,8 @@ PQ::ModifyCommand::ModifyCommand(Connection * conn, const std::string & sql, con
unsigned int
PQ::ModifyCommand::execute(bool anc)
{
- PGresult * res = PQexecPrepared(c->conn, prepare(), static_cast<int>(values.size()), &values.front(),
- &lengths.front(), &formats.front(), 0);
+ PGresult * res = PQexecPrepared(
+ c->conn, prepare(), static_cast<int>(values.size()), values.data(), lengths.data(), formats.data(), 0);
c->checkResult(res, PGRES_COMMAND_OK, PGRES_TUPLES_OK);
auto rows = atoi(PQcmdTuples(res));
PQclear(res);