From 3c455a8511f8c72552afb6ebe35a8e7c9b9af979 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 30 Jul 2022 17:21:47 +0100 Subject: Modernize various minor legacy C++isms. --- src/modules/extra/m_sqlite3.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/extra/m_sqlite3.cpp') diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 797f54a51..0ebd22452 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -141,7 +141,7 @@ public: { res.columns[i] = sqlite3_column_name(stmt, i); } - while (1) + while (true) { err = sqlite3_step(stmt); if (err == SQLITE_ROW) @@ -183,10 +183,10 @@ public: { std::string res; unsigned int param = 0; - for(std::string::size_type i = 0; i < q.length(); i++) + for (const auto chr : q) { - if (q[i] != '?') - res.push_back(q[i]); + if (chr != '?') + res.push_back(chr); else { if (param < p.size()) -- cgit v1.3.1-10-gc9f91