mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Merge pull request #139 from fekir/clean_destructors
Remove unnecessary noexcept identifier from destructors
This commit is contained in:
commit
5479cc09bf
@ -100,7 +100,7 @@ public:
|
|||||||
Database& aSrcDatabase);
|
Database& aSrcDatabase);
|
||||||
|
|
||||||
/// Release the SQLite Backup resource.
|
/// Release the SQLite Backup resource.
|
||||||
virtual ~Backup() noexcept;
|
virtual ~Backup();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Execute a step of backup with a given number of source pages to be copied
|
* @brief Execute a step of backup with a given number of source pages to be copied
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept; // nothrow
|
Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept; // nothrow
|
||||||
/// Simple destructor
|
/// Simple destructor
|
||||||
virtual ~Column() noexcept; // nothrow
|
virtual ~Column();
|
||||||
|
|
||||||
// default copy constructor and assignment operator are perfectly suited :
|
// default copy constructor and assignment operator are perfectly suited :
|
||||||
// they copy the Statement::Ptr which in turn increments the reference counter.
|
// they copy the Statement::Ptr which in turn increments the reference counter.
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @warning assert in case of error
|
* @warning assert in case of error
|
||||||
*/
|
*/
|
||||||
virtual ~Database() noexcept; // nothrow
|
virtual ~Database();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set a busy handler that sleeps for a specified amount of time when a table is locked.
|
* @brief Set a busy handler that sleeps for a specified amount of time when a table is locked.
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
Statement(Database& aDatabase, const std::string& aQuery);
|
Statement(Database& aDatabase, const std::string& aQuery);
|
||||||
|
|
||||||
/// Finalize and unregister the SQL query from the SQLite Database Connection.
|
/// Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
virtual ~Statement() noexcept; // nothrow
|
virtual ~Statement();
|
||||||
|
|
||||||
/// Reset the statement to make it ready for a new execution.
|
/// Reset the statement to make it ready for a new execution.
|
||||||
void reset();
|
void reset();
|
||||||
@ -564,7 +564,7 @@ private:
|
|||||||
// Copy constructor increments the ref counter
|
// Copy constructor increments the ref counter
|
||||||
Ptr(const Ptr& aPtr);
|
Ptr(const Ptr& aPtr);
|
||||||
// Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
|
// Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
|
||||||
~Ptr() noexcept; // nothrow (no virtual destructor needed here)
|
~Ptr();
|
||||||
|
|
||||||
/// Inline cast operator returning the pointer to SQLite Database Connection Handle
|
/// Inline cast operator returning the pointer to SQLite Database Connection Handle
|
||||||
inline operator sqlite3*() const
|
inline operator sqlite3*() const
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Safely rollback the transaction if it has not been committed.
|
* @brief Safely rollback the transaction if it has not been committed.
|
||||||
*/
|
*/
|
||||||
virtual ~Transaction() noexcept; // nothrow
|
virtual ~Transaction();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Commit the transaction.
|
* @brief Commit the transaction.
|
||||||
|
@ -70,7 +70,7 @@ Backup::Backup(Database &aDestDatabase, Database &aSrcDatabase) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Release resource for SQLite database backup
|
// Release resource for SQLite database backup
|
||||||
Backup::~Backup() noexcept
|
Backup::~Backup()
|
||||||
{
|
{
|
||||||
if (NULL != mpSQLiteBackup)
|
if (NULL != mpSQLiteBackup)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ Column::Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept : // nothrow
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
Column::~Column() noexcept // nothrow
|
Column::~Column()
|
||||||
{
|
{
|
||||||
// the finalization will be done by the destructor of the last shared pointer
|
// the finalization will be done by the destructor of the last shared pointer
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ Database::Database(const std::string& aFilename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Close the SQLite database connection.
|
// Close the SQLite database connection.
|
||||||
Database::~Database() noexcept // nothrow
|
Database::~Database()
|
||||||
{
|
{
|
||||||
const int ret = sqlite3_close(mpSQLite);
|
const int ret = sqlite3_close(mpSQLite);
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ Statement::Statement(Database &aDatabase, const std::string& aQuery) :
|
|||||||
|
|
||||||
|
|
||||||
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
// Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
Statement::~Statement() noexcept // nothrow
|
Statement::~Statement()
|
||||||
{
|
{
|
||||||
// the finalization will be done by the destructor of the last shared pointer
|
// the finalization will be done by the destructor of the last shared pointer
|
||||||
}
|
}
|
||||||
@ -437,7 +437,7 @@ Statement::Ptr::Ptr(const Statement::Ptr& aPtr) :
|
|||||||
/**
|
/**
|
||||||
* @brief Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
|
* @brief Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
|
||||||
*/
|
*/
|
||||||
Statement::Ptr::~Ptr() noexcept // nothrow
|
Statement::Ptr::~Ptr()
|
||||||
{
|
{
|
||||||
assert(NULL != mpRefCount);
|
assert(NULL != mpRefCount);
|
||||||
assert(0 != *mpRefCount);
|
assert(0 != *mpRefCount);
|
||||||
|
@ -27,7 +27,7 @@ Transaction::Transaction(Database& aDatabase) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Safely rollback the transaction if it has not been committed.
|
// Safely rollback the transaction if it has not been committed.
|
||||||
Transaction::~Transaction() noexcept // nothrow
|
Transaction::~Transaction()
|
||||||
{
|
{
|
||||||
if (false == mbCommited)
|
if (false == mbCommited)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user