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/bytestream_client.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/remote/bazel/bytestream_client.hpp') diff --git a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp index a6516e47..908f6e2a 100644 --- a/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp +++ b/src/buildtool/execution_api/remote/bazel/bytestream_client.hpp @@ -80,7 +80,7 @@ class ByteStreamClient { } }; - ByteStreamClient(std::string const& server, Port port) noexcept { + explicit ByteStreamClient(std::string const& server, Port port) noexcept { stub_ = google::bytestream::ByteStream::NewStub( CreateChannelWithCredentials(server, port)); } -- cgit v1.2.3