From a7e766e1aa77fff846d8426658befd9a01fe2861 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 11 Aug 2015 15:34:12 +0200 Subject: Share DB object between modules --- brep/search.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'brep/search.cxx') diff --git a/brep/search.cxx b/brep/search.cxx index fc86284..3aa6503 100644 --- a/brep/search.cxx +++ b/brep/search.cxx @@ -12,14 +12,13 @@ #include #include -#include - #include #include #include #include +#include using namespace std; using namespace odb::core; @@ -35,11 +34,7 @@ namespace brep cli::unknown_mode::fail, cli::unknown_mode::fail); - db_ = make_shared ("", - "", - "brep", - options_->db_host (), - options_->db_port ()); + db_ = shared_database (options_->db_host (), options_->db_port ()); if (options_->results_on_page () > 30) fail << "too many search results on page: " -- cgit v1.1