Skip to content

Commit

Permalink
Remove unused wildcard captures
Browse files Browse the repository at this point in the history
Considering that wild card captures are now known to be difficult to
maintain, remove a couple instances of them from app.  They are no
longer used as a capture, so can be safely removed with no effect.  It's
likely the compiler is doing this already.

Tested:
No functional change.  Code compiles.

Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I252344a4608f7e107bcb273d725b5a484eb7a17d
  • Loading branch information
edtanous authored and feistjj committed Nov 19, 2019
1 parent 4bb3dc3 commit fd4859a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/token_authorization_middleware.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app)
"auth routes");
BMCWEB_ROUTE(app, "/login")
.methods(
"POST"_method)([&](const crow::Request& req, crow::Response& res) {
"POST"_method)([](const crow::Request& req, crow::Response& res) {
std::string_view contentType = req.getHeaderValue("content-type");
std::string_view username;
std::string_view password;
Expand Down Expand Up @@ -448,7 +448,7 @@ template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app)

BMCWEB_ROUTE(app, "/logout")
.methods("POST"_method)(
[&](const crow::Request& req, crow::Response& res) {
[](const crow::Request& req, crow::Response& res) {
auto& session = req.session;
if (session != nullptr)
{
Expand Down

0 comments on commit fd4859a

Please sign in to comment.