Skip to content

Commit 765451c

Browse files
committed
Widget explicit constructors
1 parent 832f5ae commit 765451c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Widget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ Widget Widget::GetNextWidget(Widget widget, bool forward) const
525525
throw(
526526
std::out_of_range(std::string("PhWidgets::Widget::GetNextWidget(): \'") + WidgetClassName(this_widget) + "\' widget has no children"));
527527

528-
return result;
528+
return Widget(result);
529529
}
530530

531531
void Widget::Select()
@@ -833,7 +833,7 @@ std::set<Widget> Widget::getWidgets() const
833833

834834
for(PtWidget_t *next = front; next != NULL; next = PtWidgetBrotherBehind(next))
835835
{
836-
result.insert(next);
836+
result.insert(Widget(next));
837837
}
838838

839839
return result;

src/Widget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,14 +994,14 @@ namespace PhWidgets
994994
Constructs a Widget by ID.
995995
@param[in] abn ID given by PhAB to widget (like 'ABN_WIDGET_NAME').
996996
*/
997-
Widget(int abn);
997+
explicit Widget(int abn);
998998

999999
//! (constructor)
10001000
/*!
10011001
Constructs a Widget by pointer to widget.
10021002
@param[in] wdg pointer to Photon widget.
10031003
*/
1004-
Widget(PtWidget_t *wdg);
1004+
explicit Widget(PtWidget_t *wdg);
10051005

10061006
//! (copy constructor)
10071007
/*!

0 commit comments

Comments
 (0)