Skip to content

Commit 5479cc0

Browse files
authored
Merge pull request SRombauts#139 from fekir/clean_destructors
Remove unnecessary noexcept identifier from destructors
2 parents 926ebda + 1fd3227 commit 5479cc0

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

include/SQLiteCpp/Backup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Backup
100100
Database& aSrcDatabase);
101101

102102
/// Release the SQLite Backup resource.
103-
virtual ~Backup() noexcept;
103+
virtual ~Backup();
104104

105105
/**
106106
* @brief Execute a step of backup with a given number of source pages to be copied

include/SQLiteCpp/Column.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Column
5454
*/
5555
Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept; // nothrow
5656
/// Simple destructor
57-
virtual ~Column() noexcept; // nothrow
57+
virtual ~Column();
5858

5959
// default copy constructor and assignment operator are perfectly suited :
6060
// they copy the Statement::Ptr which in turn increments the reference counter.

include/SQLiteCpp/Database.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Database
127127
*
128128
* @warning assert in case of error
129129
*/
130-
virtual ~Database() noexcept; // nothrow
130+
virtual ~Database();
131131

132132
/**
133133
* @brief Set a busy handler that sleeps for a specified amount of time when a table is locked.

include/SQLiteCpp/Statement.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Statement
7373
Statement(Database& aDatabase, const std::string& aQuery);
7474

7575
/// Finalize and unregister the SQL query from the SQLite Database Connection.
76-
virtual ~Statement() noexcept; // nothrow
76+
virtual ~Statement();
7777

7878
/// Reset the statement to make it ready for a new execution.
7979
void reset();
@@ -564,7 +564,7 @@ class Statement
564564
// Copy constructor increments the ref counter
565565
Ptr(const Ptr& aPtr);
566566
// Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
567-
~Ptr() noexcept; // nothrow (no virtual destructor needed here)
567+
~Ptr();
568568

569569
/// Inline cast operator returning the pointer to SQLite Database Connection Handle
570570
inline operator sqlite3*() const

include/SQLiteCpp/Transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Transaction
5555
/**
5656
* @brief Safely rollback the transaction if it has not been committed.
5757
*/
58-
virtual ~Transaction() noexcept; // nothrow
58+
virtual ~Transaction();
5959

6060
/**
6161
* @brief Commit the transaction.

src/Backup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Backup::Backup(Database &aDestDatabase, Database &aSrcDatabase) :
7070
}
7171

7272
// Release resource for SQLite database backup
73-
Backup::~Backup() noexcept
73+
Backup::~Backup()
7474
{
7575
if (NULL != mpSQLiteBackup)
7676
{

src/Column.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Column::Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept : // nothrow
3333
}
3434

3535
// Finalize and unregister the SQL query from the SQLite Database Connection.
36-
Column::~Column() noexcept // nothrow
36+
Column::~Column()
3737
{
3838
// the finalization will be done by the destructor of the last shared pointer
3939
}

src/Database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Database::Database(const std::string& aFilename,
9292
}
9393

9494
// Close the SQLite database connection.
95-
Database::~Database() noexcept // nothrow
95+
Database::~Database()
9696
{
9797
const int ret = sqlite3_close(mpSQLite);
9898

src/Statement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Statement::Statement(Database &aDatabase, const std::string& aQuery) :
4444

4545

4646
// Finalize and unregister the SQL query from the SQLite Database Connection.
47-
Statement::~Statement() noexcept // nothrow
47+
Statement::~Statement()
4848
{
4949
// the finalization will be done by the destructor of the last shared pointer
5050
}
@@ -437,7 +437,7 @@ Statement::Ptr::Ptr(const Statement::Ptr& aPtr) :
437437
/**
438438
* @brief Decrement the ref counter and finalize the sqlite3_stmt when it reaches 0
439439
*/
440-
Statement::Ptr::~Ptr() noexcept // nothrow
440+
Statement::Ptr::~Ptr()
441441
{
442442
assert(NULL != mpRefCount);
443443
assert(0 != *mpRefCount);

src/Transaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Transaction::Transaction(Database& aDatabase) :
2727
}
2828

2929
// Safely rollback the transaction if it has not been committed.
30-
Transaction::~Transaction() noexcept // nothrow
30+
Transaction::~Transaction()
3131
{
3232
if (false == mbCommited)
3333
{

0 commit comments

Comments
 (0)