summaryrefslogtreecommitdiff
path: root/lib/output/pq/pqRecordSet.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-08-29 15:12:57 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-08-29 15:12:57 +0100
commit6c7222e071ffe7d20c138faac0da1d708e0a7779 (patch)
tree86ad5d55f60b42b648fbdfc4183e160aacd5ef6c /lib/output/pq/pqRecordSet.cpp
parentAdd -Wuseless-cast (diff)
downloadmygrate-6c7222e071ffe7d20c138faac0da1d708e0a7779.tar.bz2
mygrate-6c7222e071ffe7d20c138faac0da1d708e0a7779.tar.xz
mygrate-6c7222e071ffe7d20c138faac0da1d708e0a7779.zip
Add -Wold-style-cast
Diffstat (limited to 'lib/output/pq/pqRecordSet.cpp')
-rw-r--r--lib/output/pq/pqRecordSet.cpp8
1 files changed, 4 insertions, 4 deletions
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<int>(row), static_cast<int>(col))) {
return nullptr;
}
- const auto value {PQgetvalue(res.get(), (int)row, (int)col)};
- const auto size {static_cast<size_t>(PQgetlength(res.get(), (int)row, (int)col))};
- const auto type {PQftype(res.get(), (int)col)};
+ const auto value {PQgetvalue(res.get(), static_cast<int>(row), static_cast<int>(col))};
+ const auto size {static_cast<size_t>(PQgetlength(res.get(), static_cast<int>(row), static_cast<int>(col)))};
+ const auto type {PQftype(res.get(), static_cast<int>(col))};
switch (type) {
// case BITOID: TODO bool
// case BOOLOID: TODO bool