From 9915191f5c9735abf80e43113694f30bf52f6af1 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 4 Sep 2020 19:42:42 +0200 Subject: [PATCH] Improve name of ArgumentProcessingState::input_charset It holds the full option argument, not the value. --- src/argprocessing.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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"); -- 2.47.3