[Bf-blender-cvs] [e16bc136f92] master: Cleanup: Make UI tree-view item constructor explicit
Julian Eisel
noreply at git.blender.org
Wed Oct 27 12:15:06 CEST 2021
Commit: e16bc136f92bd166219ef6e21bcd1a303b335aa0
Author: Julian Eisel
Date: Wed Oct 27 12:05:23 2021 +0200
Branches: master
https://developer.blender.org/rBe16bc136f92bd166219ef6e21bcd1a303b335aa0
Cleanup: Make UI tree-view item constructor explicit
Constructors that can be called with a single argument should be
explicit, unless there's a reason not to, to avoid unintended
constructions.
===================================================================
M source/blender/editors/include/UI_tree_view.hh
===================================================================
diff --git a/source/blender/editors/include/UI_tree_view.hh b/source/blender/editors/include/UI_tree_view.hh
index fb0304060c9..5a7f16c4db6 100644
--- a/source/blender/editors/include/UI_tree_view.hh
+++ b/source/blender/editors/include/UI_tree_view.hh
@@ -401,7 +401,7 @@ class BasicTreeViewItem : public AbstractTreeViewItem {
using ActivateFn = std::function<void(BasicTreeViewItem &new_active)>;
BIFIconID icon;
- BasicTreeViewItem(StringRef label, BIFIconID icon = ICON_NONE);
+ explicit BasicTreeViewItem(StringRef label, BIFIconID icon = ICON_NONE);
void build_row(uiLayout &row) override;
void on_activate(ActivateFn fn);
More information about the Bf-blender-cvs
mailing list