mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Fix cpplint style warning introduced by #45
This commit is contained in:
parent
6499f93b07
commit
29a9645314
@ -261,24 +261,23 @@ Column Statement::getColumn(const int aIndex)
|
|||||||
Column Statement::getColumn(const char* aName)
|
Column Statement::getColumn(const char* aName)
|
||||||
{
|
{
|
||||||
int aIndex = -1;
|
int aIndex = -1;
|
||||||
|
|
||||||
if (false == mbOk)
|
if (false == mbOk)
|
||||||
{
|
{
|
||||||
throw SQLite::Exception("No row to get a column from");
|
throw SQLite::Exception("No row to get a column from");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int i = 0; i < mColumnCount; i++) {
|
for (int i = 0; i < mColumnCount; ++i) {
|
||||||
if (sqlite3_column_name(mStmtPtr, i) == aName)
|
if (sqlite3_column_name(mStmtPtr, i) == aName)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((aIndex < 0) || (aIndex >= mColumnCount)) {
|
if ((aIndex < 0) || (aIndex >= mColumnCount)) {
|
||||||
throw SQLite::Exception("Column index out of range");
|
throw SQLite::Exception("Column index out of range");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Share the Statement Object handle with the new Column created
|
// Share the Statement Object handle with the new Column created
|
||||||
return Column(mStmtPtr, aIndex);
|
return Column(mStmtPtr, aIndex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user