diff options
| author | Fuwn <[email protected]> | 2022-04-06 09:24:58 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-06 09:24:58 +0000 |
| commit | 047e83da356f6b3bac47d2f730ca0363615094cc (patch) | |
| tree | 8eda7f5bd72240fc619fac37e19c6ac0b27bb329 | |
| parent | docs(readme): add capsules using section (diff) | |
| download | maple-047e83da356f6b3bac47d2f730ca0363615094cc.tar.xz maple-047e83da356f6b3bac47d2f730ca0363615094cc.zip | |
refactor: explicit auto
| -rw-r--r-- | maple/maple.cc | 8 |
1 files 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<std::string> 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; } |