From b8ddecf41c8938136b3f4a081e1b8a98584c2401 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 16 Feb 2019 14:20:26 +0000 Subject: Modernize clang tidy fixes --- libmysqlpp/my-selectcommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmysqlpp/my-selectcommand.cpp') diff --git a/libmysqlpp/my-selectcommand.cpp b/libmysqlpp/my-selectcommand.cpp index 596c9a0..893f79f 100644 --- a/libmysqlpp/my-selectcommand.cpp +++ b/libmysqlpp/my-selectcommand.cpp @@ -2,7 +2,7 @@ #include "my-connection.h" #include "my-column.h" #include "my-error.h" -#include +#include MySQL::SelectCommand::SelectCommand(const Connection * conn, const std::string & sql) : DB::Command(sql), @@ -19,8 +19,8 @@ MySQL::SelectCommand::execute() if (!prepared) { bindParams(); fields.resize(mysql_stmt_field_count(stmt)); - for (Binds::iterator i = fields.begin(); i != fields.end(); ++i) { - memset(&*i, 0, sizeof(MYSQL_BIND)); + for (auto & b : fields) { + memset(&b, 0, sizeof(MYSQL_BIND)); } MYSQL_RES * prepare_meta_result = mysql_stmt_result_metadata(stmt); MYSQL_FIELD * fieldDefs = mysql_fetch_fields(prepare_meta_result); -- cgit v1.2.3