Merge pull request #56 from aurelien35/Dev

Removed a warning in release build with Visual Studio
This commit is contained in:
Sébastien Rombauts
2015-05-21 11:41:27 +02:00

View File

@@ -73,6 +73,10 @@ Database::Database(const std::string& aFilename,
Database::~Database() noexcept // nothrow
{
const int ret = sqlite3_close(mpSQLite);
// Avoid unreferenced variable warning when build in release mode
(void) ret;
// Only case of error is SQLITE_BUSY: "database is locked" (some statements are not finalized)
// Never throw an exception in a destructor :
SQLITECPP_ASSERT(SQLITE_OK == ret, "database is locked"); // See SQLITECPP_ENABLE_ASSERT_HANDLER