From: Erik Johansson Date: Sun, 23 Feb 2020 20:54:42 +0000 (+0100) Subject: Pass std::string instead of .c_str() X-Git-Tag: v4.0~586^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2b3af005e95fffdb04ce2cb98ec24feefa192ce;p=thirdparty%2Fccache.git Pass std::string instead of .c_str() to function taking std::string. --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 70707c00a..a1fa6a42d 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -1325,7 +1325,7 @@ to_cache(Context& ctx, failed(STATS_ERROR); } stats_update_size(ctx, - ctx.stats_file.c_str(), + ctx.stats_file, new_dest_stat.size_on_disk() - orig_dest_stat.size_on_disk(), orig_dest_stat ? 0 : 1); diff --git a/src/compress.cpp b/src/compress.cpp index d127e8610..055aaa735 100644 --- a/src/compress.cpp +++ b/src/compress.cpp @@ -127,7 +127,7 @@ recompress_file(Context& ctx, uint64_t new_size = Stat::stat(cache_file.path(), Stat::OnError::log).size_on_disk(); - stats_update_size(ctx, stats_file.c_str(), new_size - old_size, 0); + stats_update_size(ctx, stats_file, new_size - old_size, 0); cc_log("Recompression of %s done", cache_file.path().c_str()); } diff --git a/src/result.cpp b/src/result.cpp index 59f045306..306bf3e3e 100644 --- a/src/result.cpp +++ b/src/result.cpp @@ -414,7 +414,7 @@ write_raw_file_entry(Context& ctx, auto new_stat = Stat::stat(raw_file); stats_update_size(ctx, - ctx.stats_file.c_str(), + ctx.stats_file, new_stat.size_on_disk() - old_stat.size_on_disk(), (new_stat ? 1 : 0) - (old_stat ? 1 : 0)); }