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/common/blob_tree.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/common/blob_tree.hpp') diff --git a/src/buildtool/execution_api/common/blob_tree.hpp b/src/buildtool/execution_api/common/blob_tree.hpp index ad462aab..25d0f560 100644 --- a/src/buildtool/execution_api/common/blob_tree.hpp +++ b/src/buildtool/execution_api/common/blob_tree.hpp @@ -33,7 +33,7 @@ using BlobTreePtr = gsl::not_null>; /// upload. class BlobTree { public: - BlobTree(ArtifactBlob blob, std::vector nodes) + explicit BlobTree(ArtifactBlob blob, std::vector nodes) : blob_{std::move(blob)}, nodes_{std::move(nodes)} {} [[nodiscard]] auto Blob() const noexcept -> ArtifactBlob { return blob_; } -- cgit v1.2.3