From d8523efc8328cc83b30ddeb3f89038bbd02c74a5 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 17 May 2024 21:15:45 +0200 Subject: [PATCH] refactor: Simplify code --- src/ccache/argprocessing.cpp | 6 ++---- src/ccache/core/mainoptions.cpp | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ccache/argprocessing.cpp b/src/ccache/argprocessing.cpp index 355f0289..35ace369 100644 --- a/src/ccache/argprocessing.cpp +++ b/src/ccache/argprocessing.cpp @@ -1640,10 +1640,8 @@ process_args(Context& ctx) } if (args_info.generating_ipa_clones) { - fs::path ipa_path(args_info.orig_input_file); - ipa_path += ".000i.ipa-clones"; - args_info.output_ipa = - pstr(core::make_relative_path(ctx, ipa_path.string())).str(); + fs::path ipa_path(args_info.orig_input_file + ".000i.ipa-clones"); + args_info.output_ipa = pstr(core::make_relative_path(ctx, ipa_path)).str(); } Args compiler_args = state.common_args; diff --git a/src/ccache/core/mainoptions.cpp b/src/ccache/core/mainoptions.cpp index 5e0a0e37..95046300 100644 --- a/src/ccache/core/mainoptions.cpp +++ b/src/ccache/core/mainoptions.cpp @@ -816,8 +816,7 @@ process_main_options(int argc, const char* const* argv) } case PRINT_VERSION: - PRINT_RAW(stdout, CCACHE_VERSION); - PRINT_RAW(stdout, '\n'); + PRINT(stdout, "{}\n", CCACHE_VERSION); break; case 'x': // --show-compression -- 2.47.2