Skip to content

Remove unnecessary noexcept identifier from destructors #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Backup.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Backup
Database& aSrcDatabase);

/// 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
Expand Down
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Column.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Column
*/
Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept; // nothrow
/// Simple destructor
virtual ~Column() noexcept; // nothrow
virtual ~Column();

// default copy constructor and assignment operator are perfectly suited :
// they copy the Statement::Ptr which in turn increments the reference counter.
Expand Down
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Database
*
* @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.
Expand Down
4 changes: 2 additions & 2 deletions include/SQLiteCpp/Statement.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Statement
Statement(Database& aDatabase, const std::string& aQuery);

/// 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.
void reset();
Expand Down Expand Up @@ -564,7 +564,7 @@ class Statement
// Copy constructor increments the ref counter
Ptr(const Ptr& aPtr);
// 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 operator sqlite3*() const
Expand Down
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Transaction
/**
* @brief Safely rollback the transaction if it has not been committed.
*/
virtual ~Transaction() noexcept; // nothrow
virtual ~Transaction();

/**
* @brief Commit the transaction.
Expand Down
2 changes: 1 addition & 1 deletion src/Backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Backup::Backup(Database &aDestDatabase, Database &aSrcDatabase) :
}

// Release resource for SQLite database backup
Backup::~Backup() noexcept
Backup::~Backup()
{
if (NULL != mpSQLiteBackup)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Column::Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept : // nothrow
}

// 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
}
Expand Down
2 changes: 1 addition & 1 deletion src/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Database::Database(const std::string& aFilename,
}

// Close the SQLite database connection.
Database::~Database() noexcept // nothrow
Database::~Database()
{
const int ret = sqlite3_close(mpSQLite);

Expand Down
4 changes: 2 additions & 2 deletions src/Statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Statement::Statement(Database &aDatabase, const std::string& aQuery) :


// 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
}
Expand Down Expand Up @@ -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
*/
Statement::Ptr::~Ptr() noexcept // nothrow
Statement::Ptr::~Ptr()
{
assert(NULL != mpRefCount);
assert(0 != *mpRefCount);
Expand Down
2 changes: 1 addition & 1 deletion src/Transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Transaction::Transaction(Database& aDatabase) :
}

// Safely rollback the transaction if it has not been committed.
Transaction::~Transaction() noexcept // nothrow
Transaction::~Transaction()
{
if (false == mbCommited)
{
Expand Down