diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-30 15:10:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-30 15:10:09 +0200 |
commit | b4d8b7c142a0753462165257ef1bc1345bbadd6d (patch) | |
tree | b7c092a4f4c24be6dc45e8d2f582d58dcfee9cad /brep | |
parent | 07780b06aa7b0fe049cc412309cf87e7fb10a0ef (diff) |
Minor code cleanup
Diffstat (limited to 'brep')
-rw-r--r-- | brep/module.cxx | 8 | ||||
-rw-r--r-- | brep/search.cxx | 6 | ||||
-rw-r--r-- | brep/view.cxx | 6 |
3 files changed, 11 insertions, 9 deletions
diff --git a/brep/module.cxx b/brep/module.cxx index 44154d6..fc239ba 100644 --- a/brep/module.cxx +++ b/brep/module.cxx @@ -9,6 +9,8 @@ #include <memory> // unique_ptr #include <string> +#include <ostream> +#include <sstream> #include <cstring> // strncmp() #include <stdexcept> #include <functional> // bind() @@ -39,7 +41,7 @@ namespace brep try { static const char* sev_str[] = {"error", "warning", "info", "trace"}; - std::ostream& o = rs.content (500, "text/plain;charset=utf-8"); + ostream& o = rs.content (500, "text/plain;charset=utf-8"); for (const auto& d: e.data) { @@ -81,7 +83,7 @@ namespace brep log_ = &log; int argc = 0; - std::unique_ptr<const char*[]> argv (new const char*[options.size () * 2]); + unique_ptr<const char*[]> argv (new const char*[options.size () * 2]); for (const auto& nv: options) { @@ -122,7 +124,7 @@ namespace brep } catch (const cli::exception& e) { - std::ostringstream o; + ostringstream o; e.print (o); throw runtime_error (o.str ()); } diff --git a/brep/search.cxx b/brep/search.cxx index 15811e3..5f9f507 100644 --- a/brep/search.cxx +++ b/brep/search.cxx @@ -19,9 +19,9 @@ namespace brep { MODULE_DIAG; - options_ = std::make_shared<search_options> (s, - ::cli::unknown_mode::fail, - ::cli::unknown_mode::fail); + options_ = make_shared<search_options> (s, + ::cli::unknown_mode::fail, + ::cli::unknown_mode::fail); if (options_->results_on_page () > 30) fail << "too many search results on page: " diff --git a/brep/view.cxx b/brep/view.cxx index 7ccc159..a644aec 100644 --- a/brep/view.cxx +++ b/brep/view.cxx @@ -16,9 +16,9 @@ namespace brep void view:: init (::cli::scanner& s) { - options_ = std::make_shared<view_options> (s, - ::cli::unknown_mode::fail, - ::cli::unknown_mode::fail); + options_ = make_shared<view_options> (s, + ::cli::unknown_mode::fail, + ::cli::unknown_mode::fail); } void view:: |