aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Johansson <erik@ejohansson.se>2020-02-23 21:54:42 +0100
committerErik Johansson <erik@ejohansson.se>2020-02-23 22:07:08 +0100
commitb2b3af005e95fffdb04ce2cb98ec24feefa192ce (patch)
treee0087e18f7ce7f62f736a126c4197a8390803d98
parentac61a000e2bac51b21093e3c19136aa08a438292 (diff)
downloadccache-b2b3af005e95fffdb04ce2cb98ec24feefa192ce.tar.gz
ccache-b2b3af005e95fffdb04ce2cb98ec24feefa192ce.tar.bz2
ccache-b2b3af005e95fffdb04ce2cb98ec24feefa192ce.zip
Pass std::string instead of .c_str()
to function taking std::string.
-rw-r--r--src/ccache.cpp2
-rw-r--r--src/compress.cpp2
-rw-r--r--src/result.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ccache.cpp b/src/ccache.cpp
index 70707c00..a1fa6a42 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 d127e861..055aaa73 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 59f04530..306bf3e3 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));
}