diff options
Diffstat (limited to 'libpqpp/pq-cursorselectcommand.cpp')
-rw-r--r-- | libpqpp/pq-cursorselectcommand.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpqpp/pq-cursorselectcommand.cpp b/libpqpp/pq-cursorselectcommand.cpp index 1981bc8..9ae9655 100644 --- a/libpqpp/pq-cursorselectcommand.cpp +++ b/libpqpp/pq-cursorselectcommand.cpp @@ -38,8 +38,8 @@ PQ::CursorSelectCommand::execute() if (s_declare.empty()) { s_declare = mkdeclare(); } - c->checkResultFree(PQexecParams(c->conn, s_declare.c_str(), values.size(), nullptr, &values.front(), - &lengths.front(), &formats.front(), binary), + c->checkResultFree(PQexecParams(c->conn, s_declare.c_str(), static_cast<int>(values.size()), nullptr, + &values.front(), &lengths.front(), &formats.front(), binary), PGRES_COMMAND_OK); fetchTuples(); createColumns(execRes); @@ -52,8 +52,8 @@ PQ::CursorSelectCommand::fetchTuples() { execRes = c->checkResult( PQexecParams(c->conn, s_fetch.c_str(), 0, nullptr, nullptr, nullptr, nullptr, binary), PGRES_TUPLES_OK); - nTuples = PQntuples(execRes); - tuple = -1; + nTuples = static_cast<decltype(nTuples)>(PQntuples(execRes)); + tuple = static_cast<decltype(tuple)>(-1); } bool |