From 7c34af40fb77807d6f06d40e4e7aa4e0437f396b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 31 Jan 2025 13:19:21 +0100 Subject: [PATCH] squash! server : add handle_slot_type lambda Rename handle_slot_type to handle_slot_impl. --- examples/server/server.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index b895b9196..8424ffad7 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -3665,7 +3665,7 @@ int main(int argc, char ** argv) { res.status = 200; // HTTP OK }; - const auto handle_slot_type = [&ctx_server, &res_error, &res_ok, ¶ms](const httplib::Request & req, + const auto handle_slot_impl = [&ctx_server, &res_error, &res_ok, ¶ms](const httplib::Request & req, httplib::Response & res, int id_slot, server_task_type type) { json request_data = json::parse(req.body); std::string filename = request_data.at("filename"); @@ -3698,12 +3698,12 @@ int main(int argc, char ** argv) { res_ok(res, result->to_json()); }; - const auto handle_slots_save = [&handle_slot_type](const httplib::Request & req, httplib::Response & res, int id_slot) { - handle_slot_type(req, res, id_slot, SERVER_TASK_TYPE_SLOT_SAVE); + const auto handle_slots_save = [&handle_slot_impl](const httplib::Request & req, httplib::Response & res, int id_slot) { + handle_slot_impl(req, res, id_slot, SERVER_TASK_TYPE_SLOT_SAVE); }; - const auto handle_slots_restore = [&handle_slot_type](const httplib::Request & req, httplib::Response & res, int id_slot) { - handle_slot_type(req, res, id_slot, SERVER_TASK_TYPE_SLOT_RESTORE); + const auto handle_slots_restore = [&handle_slot_impl](const httplib::Request & req, httplib::Response & res, int id_slot) { + handle_slot_impl(req, res, id_slot, SERVER_TASK_TYPE_SLOT_RESTORE); }; const auto handle_slots_erase = [&ctx_server, &res_error, &res_ok](const httplib::Request & /* req */, httplib::Response & res, int id_slot) {