From 29a964531430445733d81d2953a9902353003ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Mon, 20 Apr 2015 21:04:43 +0200 Subject: [PATCH] Fix cpplint style warning introduced by #45 --- src/Statement.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Statement.cpp b/src/Statement.cpp index ac18de4..4b5a73e 100644 --- a/src/Statement.cpp +++ b/src/Statement.cpp @@ -261,24 +261,23 @@ Column Statement::getColumn(const int aIndex) Column Statement::getColumn(const char* aName) { int aIndex = -1; - + if (false == mbOk) { throw SQLite::Exception("No row to get a column from"); } else { - for (int i = 0; i < mColumnCount; i++) { + for (int i = 0; i < mColumnCount; ++i) { if (sqlite3_column_name(mStmtPtr, i) == aName) break; } - + if ((aIndex < 0) || (aIndex >= mColumnCount)) { throw SQLite::Exception("Column index out of range"); } - } - + // Share the Statement Object handle with the new Column created return Column(mStmtPtr, aIndex); }