From 109b602701578b9f2b29282f84bf2757544f8d32 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 19 Aug 2022 16:55:29 +0200 Subject: Apply C++11 fixits modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using --- src/dal/recordset.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/dal/recordset.cpp') diff --git a/src/dal/recordset.cpp b/src/dal/recordset.cpp index 0529325f..49c245cd 100644 --- a/src/dal/recordset.cpp +++ b/src/dal/recordset.cpp @@ -136,9 +136,7 @@ const std::string &RecordSet::operator()(const unsigned row, throw std::out_of_range(os.str()); } - Row::const_iterator it = std::find(mHeaders.begin(), - mHeaders.end(), - name); + auto it = std::find(mHeaders.begin(), mHeaders.end(), name); if (it == mHeaders.end()) { std::ostringstream os; os << "field " << name << " does not exist." << std::ends; @@ -163,7 +161,7 @@ std::ostream &operator<<(std::ostream &out, const RecordSet &rhs) // print the field names first. if (rhs.mHeaders.size() > 0) { out << "|"; - for (Row::const_iterator it = rhs.mHeaders.begin(); + for (auto it = rhs.mHeaders.begin(); it != rhs.mHeaders.end(); ++it) { @@ -173,12 +171,12 @@ std::ostream &operator<<(std::ostream &out, const RecordSet &rhs) } // and then print every line. - for (RecordSet::Rows::const_iterator it = rhs.mRows.begin(); + for (auto it = rhs.mRows.begin(); it != rhs.mRows.end(); ++it) { out << "|"; - for (Row::const_iterator it2 = (*it).begin(); + for (auto it2 = (*it).begin(); it2 != (*it).end(); ++it2) { -- cgit v1.2.3-60-g2f50