From 74f53b444853850144c3e63593f83c424e84a768 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 4 Jul 2024 11:21:11 +0200 Subject: Mark more constructors 'explicit' Since c++17 the 'explicit' keyword has use also for constructors with more than one argument and it is recommended to use it by default whereever implicit conversions are not expected bahaviour. --- src/buildtool/execution_api/remote/bazel/bazel_action.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/buildtool/execution_api/remote/bazel/bazel_action.hpp') diff --git a/src/buildtool/execution_api/remote/bazel/bazel_action.hpp b/src/buildtool/execution_api/remote/bazel/bazel_action.hpp index 5abfe57b..58e5965f 100644 --- a/src/buildtool/execution_api/remote/bazel/bazel_action.hpp +++ b/src/buildtool/execution_api/remote/bazel/bazel_action.hpp @@ -50,13 +50,14 @@ class BazelAction final : public IExecutionAction { CacheFlag cache_flag_{CacheFlag::CacheOutput}; std::chrono::milliseconds timeout_{kDefaultTimeout}; - BazelAction(std::shared_ptr network, - bazel_re::Digest root_digest, - std::vector command, - std::vector output_files, - std::vector output_dirs, - std::map const& env_vars, - std::map const& properties) noexcept; + explicit BazelAction( + std::shared_ptr network, + bazel_re::Digest root_digest, + std::vector command, + std::vector output_files, + std::vector output_dirs, + std::map const& env_vars, + std::map const& properties) noexcept; [[nodiscard]] auto CreateBundlesForAction(BazelBlobContainer* blobs, bazel_re::Digest const& exec_dir, -- cgit v1.2.3