From 047e83da356f6b3bac47d2f730ca0363615094cc Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 6 Apr 2022 09:24:58 +0000 Subject: refactor: explicit auto --- maple/maple.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/maple/maple.cc b/maple/maple.cc index a5009f3..0bae0e9 100644 --- a/maple/maple.cc +++ b/maple/maple.cc @@ -39,7 +39,7 @@ auto main() -> int { std::vector gemini_files; // Try a graceful shutdown when a SIGINT is detected - signal(SIGINT, [](int signal_){ + signal(SIGINT, [](int signal_) -> void { std::cout << "shutdown(" << signal_ << ")" << std::endl; close(maple_socket); @@ -47,7 +47,7 @@ auto main() -> int { }); // Find and keep track of all Gemini files to serve - for (const auto &entry : + for (const std::filesystem::directory_entry &entry : std::filesystem::recursive_directory_iterator(".maple/gmi")) { std::string file_extension = entry.path().string().substr( @@ -61,7 +61,7 @@ auto main() -> int { file_extension.end(), gemini_file_extension.begin(), gemini_file_extension.end(), - [](auto a, auto b) { + [](auto a, auto b) -> bool { return std::tolower(a) == std::tolower(b); } )) { @@ -70,7 +70,7 @@ auto main() -> int { } // Inform user of which files will be served - for (const auto &file : gemini_files) { + for (const std::string &file : gemini_files) { std::cout << "serving " << file << std::endl; } -- cgit v1.2.3