diff options
| author | Ed Tanous <ed.tanous@intel.com> | 2018-07-09 15:05:02 -0700 |
|---|---|---|
| committer | Ed Tanous <ed.tanous@intel.com> | 2018-07-26 22:48:17 +0000 |
| commit | 514b813122d646b21ecb24b96d7b1fe3eba6c88c (patch) | |
| tree | 3c8e6a7b1e6a6bcc624ea5614311f70b4ed29c76 | |
| parent | e1ae5338b88a3746bcc644c6de8b997036c80e2c (diff) | |
| download | bmcweb-514b813122d646b21ecb24b96d7b1fe3eba6c88c.tar.gz bmcweb-514b813122d646b21ecb24b96d7b1fe3eba6c88c.zip | |
Avoid an extra move when returning 404
In this case, we can simply handle the response cases in place, rather
than moving from a newly constructed object.
Change-Id: I95c7a4f3e302700a750f9c0f575b88ae4150fa15
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
| -rw-r--r-- | crow/include/crow/routing.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crow/include/crow/routing.h b/crow/include/crow/routing.h index 0fe692e..f3fedd8 100644 --- a/crow/include/crow/routing.h +++ b/crow/include/crow/routing.h @@ -910,7 +910,7 @@ class Router { if (!rule_index) { CROW_LOG_DEBUG << "Cannot match rules " << req.url; - res = response(boost::beast::http::status::not_found); + res.result(boost::beast::http::status::not_found); res.end(); return; } |

