mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Correction of the last warning for gcc -Weffc++ (a member to init in the constructor initialization list)
This commit is contained in:
parent
554a79b64d
commit
b6a86ab467
2
Makefile
2
Makefile
@ -5,7 +5,7 @@
|
||||
CXX = g++
|
||||
|
||||
# flags for C++
|
||||
CXXFLAGS ?= -Wall -Wextra -pedantic -Wformat-security -Winit-self -Wswitch-default -Wswitch-enum -Wfloat-equal -Wundef -Wshadow -Wcast-qual -Wconversion -Wlogical-op -Winline -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
|
||||
CXXFLAGS ?= -Wall -Wextra -pedantic -Weffc++ -Wformat-security -Winit-self -Wswitch-default -Wswitch-enum -Wfloat-equal -Wundef -Wshadow -Wcast-qual -Wconversion -Wlogical-op -Winline -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
|
||||
|
||||
# [Debug,Release]
|
||||
BUILD ?= Debug
|
||||
|
@ -56,6 +56,7 @@ int Database::exec(const char* apQueries) // throw(SQLite::Exception);
|
||||
// make a COPY OF THE result, else it will be destroy before the next line
|
||||
// (when the underlying temporary Statement and Column objects are destroyed)
|
||||
// this is an issue only for pointer type result (ie. char* and blob)
|
||||
// (use the Column copy-constructor)
|
||||
Column Database::execAndGet(const char* apQuery) // throw(SQLite::Exception)
|
||||
{
|
||||
Statement query(*this, apQuery);
|
||||
|
@ -28,7 +28,7 @@ namespace SQLite
|
||||
*/
|
||||
class Database
|
||||
{
|
||||
friend class Statement;
|
||||
friend class Statement; // Give Statement constructor access to the mpSQLite Connection Handle
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -20,8 +20,9 @@ namespace SQLite
|
||||
Statement::Statement(Database &aDatabase, const char* apQuery) : // throw(SQLite::Exception)
|
||||
mpStmt(NULL),
|
||||
mpStmtRefCount(NULL),
|
||||
mpSQLite(aDatabase.mpSQLite),
|
||||
mpSQLite(aDatabase.mpSQLite), // need Database friendship
|
||||
mQuery(apQuery),
|
||||
mColumnCount(0),
|
||||
mbOk(false),
|
||||
mbDone(false)
|
||||
{
|
||||
@ -186,6 +187,7 @@ bool Statement::executeStep(void) // throw(SQLite::Exception)
|
||||
}
|
||||
|
||||
// Return a copy of the column data specified by its index starting at 0
|
||||
// (use the Column copy-constructor)
|
||||
Column Statement::getColumn(const int aIndex) const // throw(SQLite::Exception)
|
||||
{
|
||||
if (false == mbOk)
|
||||
|
Loading…
x
Reference in New Issue
Block a user