diff options
-rw-r--r-- | odb/mssql/database.cxx | 2 | ||||
-rw-r--r-- | odb/mssql/database.hxx | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/odb/mssql/database.cxx b/odb/mssql/database.cxx index b70ef24..a56181f 100644 --- a/odb/mssql/database.cxx +++ b/odb/mssql/database.cxx @@ -442,7 +442,7 @@ namespace odb connect_string_ += extra_connect_string_; } - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx index 3ad09a9..66b3a86 100644 --- a/odb/mssql/database.hxx +++ b/odb/mssql/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/mssql/mssql-fwd.hxx> @@ -253,11 +253,7 @@ namespace odb auto_handle<SQL_HANDLE_ENV> auto_environment_; SQLHENV environment_; -#ifdef ODB_CXX11 - std::unique_ptr<connection_factory> factory_; -#else - std::auto_ptr<connection_factory> factory_; -#endif + details::unique_ptr<connection_factory> factory_; }; } } |