summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_tree.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-04 11:21:11 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-04 16:05:08 +0200
commit74f53b444853850144c3e63593f83c424e84a768 (patch)
tree6bd2ca1c22f368c1f7c1b121ce205446a136fa45 /src/buildtool/file_system/git_tree.hpp
parentce0f5420e60c4807cca3f57131ad24df8a6b9b4b (diff)
downloadjustbuild-74f53b444853850144c3e63593f83c424e84a768.tar.gz
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.
Diffstat (limited to 'src/buildtool/file_system/git_tree.hpp')
-rw-r--r--src/buildtool/file_system/git_tree.hpp8
1 files changed, 4 insertions, 4 deletions
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<GitCASPtr> const& cas,
- entries_t&& entries,
- std::string raw_id,
- bool ignore_special = false) noexcept
+ explicit GitTree(gsl::not_null<GitCASPtr> 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)},