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/file_system/git_tree.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/buildtool/file_system/git_tree.hpp') diff --git a/src/buildtool/file_system/git_tree.hpp b/src/buildtool/file_system/git_tree.hpp index c6a0833e..f928b7d7 100644 --- a/src/buildtool/file_system/git_tree.hpp +++ b/src/buildtool/file_system/git_tree.hpp @@ -99,10 +99,10 @@ class GitTree { // If set, ignore all fast tree lookups and always traverse. bool ignore_special_; - GitTree(gsl::not_null const& cas, - entries_t&& entries, - std::string raw_id, - bool ignore_special = false) noexcept + explicit GitTree(gsl::not_null const& cas, + entries_t&& entries, + std::string raw_id, + bool ignore_special = false) noexcept : cas_{cas}, entries_{std::move(entries)}, raw_id_{std::move(raw_id)}, -- cgit v1.2.3