]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Simplify code
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Feb 2020 20:25:38 +0000 (21:25 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 10 Feb 2020 20:25:38 +0000 (21:25 +0100)
src/ccache.cpp

index 86ba07a2e4eb104bcd19bbfa4b4e043b373cb4de..5130ca18e2f69eacc182ca817443a713c378e67d 100644 (file)
@@ -372,8 +372,7 @@ dump_debug_log_buffer_exitfn(void* context)
     return;
   }
 
-  std::string path =
-    fmt::format("{}.ccache-log", ctx.args_info.output_obj.c_str());
+  std::string path = fmt::format("{}.ccache-log", ctx.args_info.output_obj);
   cc_dump_debug_log_buffer(path.c_str());
 }
 
@@ -3771,7 +3770,7 @@ do_cache_compilation(Context& ctx, char* argv[])
   FILE* debug_text_file = NULL;
   if (g_config.debug()) {
     std::string path =
-      fmt::format("{}.ccache-input-text", ctx.args_info.output_obj.c_str());
+      fmt::format("{}.ccache-input-text", ctx.args_info.output_obj);
     debug_text_file = fopen(path.c_str(), "w");
     if (debug_text_file) {
       exitfn_add(fclose_exitfn, debug_text_file);