diff options
-rw-r--r-- | odb/oracle/database.cxx | 6 | ||||
-rw-r--r-- | odb/oracle/database.hxx | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/odb/oracle/database.cxx b/odb/oracle/database.cxx index a8abb53..dd35305 100644 --- a/odb/oracle/database.cxx +++ b/odb/oracle/database.cxx @@ -51,7 +51,7 @@ namespace odb auto_environment_.reset (environment_); } - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); @@ -111,7 +111,7 @@ namespace odb db_ = ss.str (); - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); @@ -210,7 +210,7 @@ namespace odb throw cli_exception (oss.str ()); } - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx index d51d073..65d29c6 100644 --- a/odb/oracle/database.hxx +++ b/odb/oracle/database.hxx @@ -12,7 +12,7 @@ #include <iosfwd> // std::ostream #include <odb/database.hxx> -#include <odb/details/config.hxx> // ODB_CXX11 +#include <odb/details/unique-ptr.hxx> #include <odb/details/transfer-ptr.hxx> #include <odb/oracle/version.hxx> @@ -188,11 +188,7 @@ namespace odb auto_handle<OCIEnv> auto_environment_; OCIEnv* environment_; -#ifdef ODB_CXX11 - std::unique_ptr<connection_factory> factory_; -#else - std::auto_ptr<connection_factory> factory_; -#endif + details::unique_ptr<connection_factory> factory_; }; } } |