Fix initialization order of base class and member variable in ui::CloseEvent class

Fixed clang warning: field 'm_canceled' will be initialized after base 'ui::Event'
This commit is contained in:
David Capello 2021-09-06 18:00:56 -03:00
parent 495623d6b2
commit 7d248c33d7

View File

@ -16,7 +16,8 @@ namespace ui {
{ {
public: public:
CloseEvent(Component* source) CloseEvent(Component* source)
: m_canceled(false), Event(source) { } : Event(source)
, m_canceled(false) { }
void cancel() { m_canceled = true; } void cancel() { m_canceled = true; }
bool canceled() const { return m_canceled; } bool canceled() const { return m_canceled; }