From 6c7222e071ffe7d20c138faac0da1d708e0a7779 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 29 Aug 2021 15:12:57 +0100 Subject: Add -Wold-style-cast --- lib/output/pq/pqRecordSet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/output/pq/pqRecordSet.cpp') diff --git a/lib/output/pq/pqRecordSet.cpp b/lib/output/pq/pqRecordSet.cpp index 4d5349f..9eeb3cd 100644 --- a/lib/output/pq/pqRecordSet.cpp +++ b/lib/output/pq/pqRecordSet.cpp @@ -30,12 +30,12 @@ namespace MyGrate::Output::Pq { DbValue PqRecordSet::at(std::size_t row, std::size_t col) const { - if (PQgetisnull(res.get(), (int)row, (int)col)) { + if (PQgetisnull(res.get(), static_cast(row), static_cast(col))) { return nullptr; } - const auto value {PQgetvalue(res.get(), (int)row, (int)col)}; - const auto size {static_cast(PQgetlength(res.get(), (int)row, (int)col))}; - const auto type {PQftype(res.get(), (int)col)}; + const auto value {PQgetvalue(res.get(), static_cast(row), static_cast(col))}; + const auto size {static_cast(PQgetlength(res.get(), static_cast(row), static_cast(col)))}; + const auto type {PQftype(res.get(), static_cast(col))}; switch (type) { // case BITOID: TODO bool // case BOOLOID: TODO bool -- cgit v1.2.3