diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-31 19:31:36 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-31 19:42:06 +0200 |
commit | f62f1ca437c3dfbab736de66a35fa062bf428de9 (patch) | |
tree | 5a3916e39a708c6cb78e7451ad8cbb0488a10822 /storage | |
parent | b6aa47778163fe8e28f7a2c35c8ac1b3999320b4 (diff) |
Fix up some minor codestyle issues
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/frameworkimpl/status/statuswebserver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/src/vespa/storage/frameworkimpl/status/statuswebserver.cpp b/storage/src/vespa/storage/frameworkimpl/status/statuswebserver.cpp index b656c82c0c9..00dce18e084 100644 --- a/storage/src/vespa/storage/frameworkimpl/status/statuswebserver.cpp +++ b/storage/src/vespa/storage/frameworkimpl/status/statuswebserver.cpp @@ -7,8 +7,8 @@ #include <vespa/vespalib/util/host_name.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/component/vtag.h> -#include <vespa/log/log.h> +#include <vespa/log/log.h> LOG_SETUP(".status"); namespace storage { @@ -176,7 +176,7 @@ StatusWebServer::WebServer::onGetRequest(const string & tmpurl, const string &se // Route other status requests that can possibly deadlock to a // worker thread. vespalib::MonitorGuard monitor(_status._workerMonitor); - _status._queuedRequests.emplace_back(new HttpRequest(url.c_str(), urlpath.getServerSpec())); + _status._queuedRequests.emplace_back(std::make_shared<HttpRequest>(url.c_str(), urlpath.getServerSpec())); HttpRequest* req = _status._queuedRequests.back().get(); framework::SecondTime timeout(urlpath.get("timeout", 30u)); framework::SecondTime timeoutTime(_status._component->getClock().getTimeInSeconds() + timeout); @@ -222,7 +222,7 @@ StatusWebServer::WebServer::onGetRequest(const string & tmpurl, const string &se namespace { class IndexPageReporter : public framework::HtmlStatusReporter { std::ostringstream ost; - void reportHtmlStatus(std::ostream& out,const framework::HttpUrlPath&) const override{ + void reportHtmlStatus(std::ostream& out,const framework::HttpUrlPath&) const override { out << ost.str(); } @@ -244,9 +244,9 @@ StatusWebServer::handlePage(const framework::HttpUrlPath& urlpath, std::ostream& if (slashPos != std::string::npos) link = link.substr(0, slashPos); bool pageExisted = false; - if (link.size() > 0) { + if ( ! link.empty()) { const framework::StatusReporter *reporter = _reporterMap.getStatusReporter(link); - if (reporter != 0) { + if (reporter != nullptr) { try { pageExisted = reporter->reportHttpHeader(out, urlpath); if (pageExisted) { |