diff --git a/src/import_pipeline.cc b/src/import_pipeline.cc index a22a1caf..2f2d2bfd 100644 --- a/src/import_pipeline.cc +++ b/src/import_pipeline.cc @@ -286,10 +286,10 @@ std::vector PreloadFileContents( // index->file_contents comes from cache, so we need to check if that cache is // still valid. if so, we can use it, otherwise we need to load from disk. auto get_latest_content = [](const std::string& path, int64_t cached_time, - const std::string& cached) { + const std::string& cached) -> std::string { optional mod_time = GetLastModificationTime(path); if (!mod_time) - return std::string(""); + return ""; if (*mod_time == cached_time) return cached; @@ -297,7 +297,7 @@ std::vector PreloadFileContents( optional fresh_content = ReadContent(path); if (!fresh_content) { LOG_S(ERROR) << "Failed to load content for " << path; - return std::string(""); + return ""; } return *fresh_content; };