From e0e3a39d5d672beec510447f4291412b44ebc299 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 31 Jan 2018 21:49:56 -0800 Subject: [PATCH] Fix clang 3.5 compile error --- src/import_pipeline.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; };