From 811296277875130795eba2ed7804d21fa01f8d84 Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 26 May 2014 09:51:05 +0800 Subject: [PATCH] issue #5183, remove in class member initialization --- cocos/ui/UILayoutExecutant.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cocos/ui/UILayoutExecutant.h b/cocos/ui/UILayoutExecutant.h index e65536dc3b..4c3e08fb93 100644 --- a/cocos/ui/UILayoutExecutant.h +++ b/cocos/ui/UILayoutExecutant.h @@ -66,7 +66,13 @@ public: class RelativeLayoutExecutant : public LayoutExecutant { public: - RelativeLayoutExecutant(){}; + RelativeLayoutExecutant() + :_unlayoutChildCount(0), + _widget(nullptr), + _finalPositionX(0.0f), + _finalPositionY(0.0f), + _relativeWidgetLP(nullptr) + {} virtual ~RelativeLayoutExecutant(){}; static RelativeLayoutExecutant* create(); virtual void doLayout(LayoutProtocol *layout) override; @@ -77,13 +83,13 @@ protected: bool caculateFinalPositionWithRelativeWidget(LayoutProtocol *layout); void caculateFinalPositionWithRelativeAlign(); - ssize_t _unlayoutChildCount = 0; + ssize_t _unlayoutChildCount; Vector _widgetChildren; - Widget* _widget = nullptr; - float _finalPositionX = 0.0; - float _finalPositionY = 0.0; + Widget* _widget; + float _finalPositionX; + float _finalPositionY; - RelativeLayoutParameter* _relativeWidgetLP = nullptr; + RelativeLayoutParameter* _relativeWidgetLP; }; }