diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-03-02 14:11:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-03-02 14:11:03 +0200 |
commit | 9261a7076374956cacaf45d5455233ab194b7f8f (patch) | |
tree | cafb50e6636a5890eb7497fe9a2e680f5fd8bbd0 /odb/pgsql/database.cxx | |
parent | d5924c862b549f9e3d6daedae6611cfc605cdfe7 (diff) |
Reimplement C++11 support to be header-only
This way, the same build of the runtime libraries can be used in both
C++98 and C++11 modes. This is important for when runtimes are installed
or packaged.
Diffstat (limited to 'odb/pgsql/database.cxx')
-rw-r--r-- | odb/pgsql/database.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/odb/pgsql/database.cxx b/odb/pgsql/database.cxx index 6a65780..4777f79 100644 --- a/odb/pgsql/database.cxx +++ b/odb/pgsql/database.cxx @@ -60,7 +60,7 @@ namespace odb conninfo_ = ss.str (); - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); @@ -108,7 +108,7 @@ namespace odb conninfo_ = ss.str (); - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); @@ -118,7 +118,7 @@ namespace odb database (const string& conninfo, transfer_ptr<connection_factory> factory) : port_ (0), conninfo_ (conninfo), factory_ (factory.transfer ()) { - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); @@ -191,7 +191,7 @@ namespace odb throw cli_exception (oss.str ()); } - if (factory_.get () == 0) + if (!factory_) factory_.reset (new connection_pool_factory ()); factory_->database (*this); |