summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-07-05 19:32:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-07-05 19:32:42 +0100
commitf39817f958295f8e6b3d018bd17b8ef4103c45a8 (patch)
tree9615ed8f12454dcac7f3db3bfb42bc343b796f3f /lib
parentHandy operator to get a string_view of a MARIADB_STRING (diff)
downloadmygrate-f39817f958295f8e6b3d018bd17b8ef4103c45a8.tar.bz2
mygrate-f39817f958295f8e6b3d018bd17b8ef4103c45a8.tar.xz
mygrate-f39817f958295f8e6b3d018bd17b8ef4103c45a8.zip
Explicit RowView constructor
Diffstat (limited to 'lib')
-rw-r--r--lib/dbRecordSet.cpp6
-rw-r--r--lib/dbRecordSet.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/dbRecordSet.cpp b/lib/dbRecordSet.cpp
index d5e55f0..ec3db4a 100644
--- a/lib/dbRecordSet.cpp
+++ b/lib/dbRecordSet.cpp
@@ -39,7 +39,7 @@ namespace MyGrate {
RowView
RecordSet::operator[](std::size_t row) const
{
- return {this, row};
+ return RowView {this, row};
}
DbValue
@@ -51,12 +51,12 @@ namespace MyGrate {
RowView
RecordSet::begin() const
{
- return {this, 0};
+ return RowView {this, 0};
}
RowView
RecordSet::end() const
{
- return {this, rows()};
+ return RowView {this, rows()};
}
}
diff --git a/lib/dbRecordSet.h b/lib/dbRecordSet.h
index 3bea950..80919dc 100644
--- a/lib/dbRecordSet.h
+++ b/lib/dbRecordSet.h
@@ -9,7 +9,7 @@ namespace MyGrate {
class RowView {
public:
- RowView(const RecordSet * rs, std::size_t rw = 0);
+ explicit RowView(const RecordSet * rs, std::size_t rw = 0);
DbValue operator[](std::size_t col) const;