From cfea537eef3ef77cfadd7654471590172c1a1a37 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 4 Sep 2020 15:44:49 +0200 Subject: [PATCH] Clean up ProcessArgsResult --- src/argprocessing.hpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/argprocessing.hpp b/src/argprocessing.hpp index 8424a95a9..cd36c7d0b 100644 --- a/src/argprocessing.hpp +++ b/src/argprocessing.hpp @@ -24,21 +24,13 @@ #include "third_party/nonstd/optional.hpp" class Context; -class Args; struct ProcessArgsResult { - ProcessArgsResult(Statistic err) : error(err) - { - } + ProcessArgsResult(Statistic error); ProcessArgsResult(Args preprocessor_args, Args extra_args_to_hash, - Args compiler_args) - : preprocessor_args(preprocessor_args), - extra_args_to_hash(extra_args_to_hash), - compiler_args(compiler_args) - { - } + Args compiler_args); // nullopt on success, otherwise the statistics counter that should be // incremented. @@ -47,12 +39,24 @@ struct ProcessArgsResult // Arguments (except -E) to send to the preprocessor. Args preprocessor_args; - // Arguments not sent to the preprocessor but that should be part of the - // hash. + // Arguments not sent to the preprocessor but that should be part of the hash. Args extra_args_to_hash; // Arguments to send to the real compiler. Args compiler_args; }; +inline ProcessArgsResult::ProcessArgsResult(Statistic error) : error(error) +{ +} + +inline ProcessArgsResult::ProcessArgsResult(Args preprocessor_args, + Args extra_args_to_hash, + Args compiler_args) + : preprocessor_args(preprocessor_args), + extra_args_to_hash(extra_args_to_hash), + compiler_args(compiler_args) +{ +} + ProcessArgsResult process_args(Context& ctx); -- 2.47.3