diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-28 14:24:04 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-04-28 14:24:04 +0100 |
commit | 1a7b43c875227527bf180066354f6c3d6515d5cb (patch) | |
tree | 7d9364adb554b2bd5f1ea5701be82923e04e0793 /project2/sql/rdbmsDataSource.cpp | |
parent | Fix throw in destructors (diff) | |
download | project2-1a7b43c875227527bf180066354f6c3d6515d5cb.tar.bz2 project2-1a7b43c875227527bf180066354f6c3d6515d5cb.tar.xz project2-1a7b43c875227527bf180066354f6c3d6515d5cb.zip |
C++17 and Ice 3.7project2-1.3.0
Updates all code to work with C++17 and Ice 3.7 and related updates in
used libraries.
Diffstat (limited to 'project2/sql/rdbmsDataSource.cpp')
-rw-r--r-- | project2/sql/rdbmsDataSource.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/project2/sql/rdbmsDataSource.cpp b/project2/sql/rdbmsDataSource.cpp index a3bb6a1..15ae638 100644 --- a/project2/sql/rdbmsDataSource.cpp +++ b/project2/sql/rdbmsDataSource.cpp @@ -200,7 +200,7 @@ RdbmsDataSource::connectTo(const ConnectionInfo & dsn) } } -RdbmsDataSource::RdbmsConnection::RdbmsConnection(DB::Connection * const con, time_t kat) : +RdbmsDataSource::RdbmsConnection::RdbmsConnection(DB::ConnectionPtr const con, time_t kat) : connection(con), txOpen(false), lastUsedTime(0), @@ -212,7 +212,6 @@ RdbmsDataSource::RdbmsConnection::RdbmsConnection(DB::Connection * const con, ti RdbmsDataSource::RdbmsConnection::~RdbmsConnection() { connection->finish(); - delete connection; } void @@ -248,7 +247,7 @@ RdbmsDataSource::ConnectionInfo::ConnectionInfo(ScriptNodePtr node) : { } -DB::Connection * +DB::ConnectionPtr RdbmsDataSource::ConnectionInfo::connect() const { return DB::ConnectionFactory::createNew(typeId, dsn); @@ -291,7 +290,7 @@ RdbmsDataSource::ConnectionRef::operator=(const RdbmsDataSource::ConnectionRef & DB::Connection * RdbmsDataSource::ConnectionRef::operator->() const { - return conn->connection; + return conn->connection.get(); } DB::Connection & @@ -303,6 +302,6 @@ RdbmsDataSource::ConnectionRef::operator*() const DB::Connection * RdbmsDataSource::ConnectionRef::get() const { - return conn->connection; + return conn->connection.get(); } |