From: Joel Rosdahl Date: Sun, 28 Aug 2022 09:04:25 +0000 (+0200) Subject: chore: Tweak code format and comment X-Git-Tag: v4.7~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d95687beaf92403bd9607e2fc62e66fe4c19327;p=thirdparty%2Fccache.git chore: Tweak code format and comment --- diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index dfe4e90f8..f1aab5388 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -69,7 +69,7 @@ struct ArgumentProcessingState bool found_mf_opt = false; bool found_wp_md_or_mmd_opt = false; bool found_md_or_mmd_opt = false; - bool found_opt_Wa_a = false; + bool found_Wa_a_opt = false; std::string explicit_language; // As specified with -x. std::string input_charset_option; // -finput-charset=... @@ -420,12 +420,12 @@ process_option_arg(const Context& ctx, if (util::starts_with(args[i], "-Wa,")) { for (const auto part : util::Tokenizer(&args[i][4], ",")) { if (util::starts_with(part, "-a")) { - if (state.found_opt_Wa_a) { + if (state.found_Wa_a_opt) { LOG_RAW( "Multiple assembler listing options (-Wa,-a) are not supported"); return Statistic::unsupported_compiler_option; } - state.found_opt_Wa_a = true; + state.found_Wa_a_opt = true; const auto eq_pos = part.find('='); if (eq_pos != std::string_view::npos) { diff --git a/src/ccache.cpp b/src/ccache.cpp index 95bded45a..cef6ffab7 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -1592,14 +1592,13 @@ calculate_result_and_manifest_key(Context& ctx, // Case 2: -Wa,-a= (write to stdout and stderr) // Case 3: -Wa,-a=file (write to file) // - // No need to include the file part in case 3 since the filename is not - // part of the output. + // No need to include the file part in case 3 in the hash since the + // filename is not part of the output. - using util::Tokenizer; hash.hash_delimiter("arg"); bool first = true; - for (const auto part : - Tokenizer(args[i], ",", Tokenizer::Mode::include_empty)) { + for (const auto part : util::Tokenizer( + args[i], ",", util::Tokenizer::Mode::include_empty)) { if (first) { first = false; } else {