reformat more files; add Ep3 map endpoint in HTTP server

This commit is contained in:
Martin Michelsen
2025-12-21 10:35:41 -08:00
parent a462a774f5
commit 894ac6b8ff
19 changed files with 376 additions and 168 deletions
+2 -4
View File
@@ -44,16 +44,14 @@ FileContentsCache::GetResult FileContentsCache::get_or_load(const char* name) {
return this->get_or_load(string(name));
}
shared_ptr<const FileContentsCache::File> FileContentsCache::get_or_throw(
const std::string& name) {
shared_ptr<const FileContentsCache::File> FileContentsCache::get_or_throw(const std::string& name) {
auto throw_fn = +[](const std::string&) -> string {
throw out_of_range("file missing from cache");
};
return this->get(name, throw_fn).file;
}
shared_ptr<const FileContentsCache::File> FileContentsCache::get_or_throw(
const char* name) {
shared_ptr<const FileContentsCache::File> FileContentsCache::get_or_throw(const char* name) {
return this->get_or_throw(string(name));
}