aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/sqlite/database.cxx4
-rw-r--r--odb/sqlite/database.hxx9
2 files changed, 4 insertions, 9 deletions
diff --git a/odb/sqlite/database.cxx b/odb/sqlite/database.cxx
index cd62a1c..74c32d1 100644
--- a/odb/sqlite/database.cxx
+++ b/odb/sqlite/database.cxx
@@ -35,7 +35,7 @@ namespace odb
foreign_keys_ (foreign_keys),
factory_ (factory.transfer ())
{
- if (factory_.get () == 0)
+ if (!factory_)
factory_.reset (new connection_pool_factory ());
factory_->database (*this);
@@ -74,7 +74,7 @@ namespace odb
throw cli_exception (ostr.str ());
}
- if (factory_.get () == 0)
+ if (!factory_)
factory_.reset (new connection_pool_factory ());
factory_->database (*this);
diff --git a/odb/sqlite/database.hxx b/odb/sqlite/database.hxx
index d2bf61f..021a5df 100644
--- a/odb/sqlite/database.hxx
+++ b/odb/sqlite/database.hxx
@@ -14,7 +14,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/sqlite/version.hxx>
@@ -133,12 +133,7 @@ namespace odb
std::string name_;
int flags_;
bool foreign_keys_;
-
-#ifdef ODB_CXX11
- std::unique_ptr<connection_factory> factory_;
-#else
- std::auto_ptr<connection_factory> factory_;
-#endif
+ details::unique_ptr<connection_factory> factory_;
};
}
}