diff options
-rw-r--r-- | project2/sql/rdbmsDataSource.cpp | 8 | ||||
-rw-r--r-- | project2/sql/rdbmsDataSource.h | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/project2/sql/rdbmsDataSource.cpp b/project2/sql/rdbmsDataSource.cpp index 46e97a8..a3bb6a1 100644 --- a/project2/sql/rdbmsDataSource.cpp +++ b/project2/sql/rdbmsDataSource.cpp @@ -200,7 +200,7 @@ RdbmsDataSource::connectTo(const ConnectionInfo & dsn) } } -RdbmsDataSource::RdbmsConnection::RdbmsConnection(const DB::Connection * con, time_t kat) : +RdbmsDataSource::RdbmsConnection::RdbmsConnection(DB::Connection * const con, time_t kat) : connection(con), txOpen(false), lastUsedTime(0), @@ -288,19 +288,19 @@ RdbmsDataSource::ConnectionRef::operator=(const RdbmsDataSource::ConnectionRef & return *this; } -const DB::Connection * +DB::Connection * RdbmsDataSource::ConnectionRef::operator->() const { return conn->connection; } -const DB::Connection & +DB::Connection & RdbmsDataSource::ConnectionRef::operator*() const { return *conn->connection; } -const DB::Connection * +DB::Connection * RdbmsDataSource::ConnectionRef::get() const { return conn->connection; diff --git a/project2/sql/rdbmsDataSource.h b/project2/sql/rdbmsDataSource.h index 979cec6..373ed34 100644 --- a/project2/sql/rdbmsDataSource.h +++ b/project2/sql/rdbmsDataSource.h @@ -18,12 +18,12 @@ class RdbmsDataSource : public DataSource { class RdbmsConnection { public: - RdbmsConnection(const DB::Connection * connection, time_t kat); + RdbmsConnection(DB::Connection * const connection, time_t kat); ~RdbmsConnection(); void touch() const; bool isExpired() const; - const DB::Connection * const connection; + DB::Connection * const connection; bool txOpen; boost::optional<std::thread::id> threadId; @@ -45,9 +45,9 @@ class RdbmsDataSource : public DataSource { ~ConnectionRef(); ConnectionRef & operator=(const ConnectionRef &); - const DB::Connection * operator->() const; - const DB::Connection & operator*() const; - const DB::Connection * get() const; + DB::Connection * operator->() const; + DB::Connection & operator*() const; + DB::Connection * get() const; private: ConnectionPtr conn; }; |