From: Joel Rosdahl Date: Fri, 4 Sep 2020 17:42:42 +0000 (+0200) Subject: Improve name of ArgumentProcessingState::input_charset X-Git-Tag: v4.0~128 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9915191f5c9735abf80e43113694f30bf52f6af1;p=thirdparty%2Fccache.git Improve name of ArgumentProcessingState::input_charset It holds the full option argument, not the value. --- diff --git a/src/argprocessing.cpp b/src/argprocessing.cpp index 40ba4a9e2..dfdd94837 100644 --- a/src/argprocessing.cpp +++ b/src/argprocessing.cpp @@ -46,9 +46,9 @@ struct ArgumentProcessingState bool found_directives_only = false; bool found_rewrite_includes = false; - std::string explicit_language; // As specified with -x. - std::string file_language; // As deduced from file extension. - std::string input_charset; + std::string explicit_language; // As specified with -x. + std::string file_language; // As deduced from file extension. + std::string input_charset_option; // -finput-charset=... // Is the dependency makefile name overridden with -MF? bool dependency_filename_specified = false; @@ -669,7 +669,7 @@ process_arg(Context& ctx, // Input charset needs to be handled specially. if (Util::starts_with(args[i], "-finput-charset=")) { - state.input_charset = args[i]; + state.input_charset_option = args[i]; return nullopt; } @@ -1079,8 +1079,8 @@ process_args(Context& ctx) // // -finput-charset=XXX (otherwise conversion happens twice) // -x XXX (otherwise the wrong language is selected) - if (!state.input_charset.empty()) { - state.cpp_args.push_back(state.input_charset); + if (!state.input_charset_option.empty()) { + state.cpp_args.push_back(state.input_charset_option); } if (state.found_pch) { state.cpp_args.push_back("-fpch-preprocess");