Unverified Commit 2978d45d authored by Dennis Jenkins's avatar Dennis Jenkins Committed by GitHub

Merge pull request #336 from mfurkanuslu/master

small refactorings
parents 9829d5e6 ad1c530a
......@@ -41,7 +41,7 @@ splitUrl(const std::string& url) {
}
struct ExceptionPrinter {
void operator()(std::exception_ptr exc) {
void operator()(std::exception_ptr exc) const {
try {
std::rethrow_exception(exc);
} catch (const std::exception& e) {
......
......@@ -418,7 +418,7 @@ Swagger::install(Rest::Router& router) {
return res;
}
bool matches(const Rest::Request& req) {
bool matches(const Rest::Request& req) const {
auto res = req.resource();
if (value == res)
return true;
......
......@@ -282,7 +282,7 @@ Pistache::Rest::SegmentTreeNode::findRoute(
// in case of more than one optional at this point, as it is an
// ambuiguity, it is resolved by using the first optional
auto optional = optional_.begin();
std::string opt {optional->first.data(), optional->first.length()};
// std::string opt {optional->first.data(), optional->first.length()};
return optional->second->findRoute(path, params, splats);
} else if (route_ == nullptr) {
// if we are here but route is null, we reached this point
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment