From: Joel Rosdahl Date: Mon, 21 Sep 2020 06:25:38 +0000 (+0200) Subject: Pass Args by const ref X-Git-Tag: v4.0~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6cb1707b0b84a701b0c10bbe19eda790594de4d;p=thirdparty%2Fccache.git Pass Args by const ref It doesn’t matter in practice, but LGTM gets happier. --- diff --git a/src/argprocessing.hpp b/src/argprocessing.hpp index 6a34ab6af..c040c44e5 100644 --- a/src/argprocessing.hpp +++ b/src/argprocessing.hpp @@ -28,9 +28,9 @@ class Context; struct ProcessArgsResult { ProcessArgsResult(Statistic error); - ProcessArgsResult(Args preprocessor_args, - Args extra_args_to_hash, - Args compiler_args); + ProcessArgsResult(const Args& preprocessor_args, + const Args& extra_args_to_hash, + const Args& compiler_args); // nullopt on success, otherwise the statistics counter that should be // incremented. @@ -50,9 +50,9 @@ inline ProcessArgsResult::ProcessArgsResult(Statistic error_) : error(error_) { } -inline ProcessArgsResult::ProcessArgsResult(Args preprocessor_args_, - Args extra_args_to_hash_, - Args compiler_args_) +inline ProcessArgsResult::ProcessArgsResult(const Args& preprocessor_args_, + const Args& extra_args_to_hash_, + const Args& compiler_args_) : preprocessor_args(preprocessor_args_), extra_args_to_hash(extra_args_to_hash_), compiler_args(compiler_args_)