]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Pass Args by const ref
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 21 Sep 2020 06:25:38 +0000 (08:25 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 23 Sep 2020 07:41:38 +0000 (09:41 +0200)
It doesn’t matter in practice, but LGTM gets happier.

src/argprocessing.hpp

index 6a34ab6af953ea81421c9975077243f34f044843..c040c44e57fe7762fbf8b29c19674732bae2978e 100644 (file)
@@ -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_)