]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Tweak code format and comment
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 28 Aug 2022 09:04:25 +0000 (11:04 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 28 Aug 2022 09:22:24 +0000 (11:22 +0200)
src/argprocessing.cpp
src/ccache.cpp

index dfe4e90f82fd461d0ced98f4e5676206f966001e..f1aab538891af02d0fedd8a15075395edf39a600 100644 (file)
@@ -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) {
index 95bded45a3b30161ca860525024c66b153f5e09f..cef6ffab705ef908c97db89f905df3ce883a1613 100644 (file)
@@ -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 {