diff options
author | crupest <crupest@outlook.com> | 2019-03-24 19:44:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-24 19:44:31 +0800 |
commit | b76e435faca204f830644047077ab08930dc8f9c (patch) | |
tree | 8bca146bc7443a704d3cb4b71b36e632cb505c25 /src/ui/controls/flex_layout.cpp | |
parent | 79d1d76509dbf6cf9c79f8eb55968535982975aa (diff) | |
download | cru-b76e435faca204f830644047077ab08930dc8f9c.tar.gz cru-b76e435faca204f830644047077ab08930dc8f9c.tar.bz2 cru-b76e435faca204f830644047077ab08930dc8f9c.zip |
...
Diffstat (limited to 'src/ui/controls/flex_layout.cpp')
-rw-r--r-- | src/ui/controls/flex_layout.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp index 289df1f1..bdbe2d73 100644 --- a/src/ui/controls/flex_layout.cpp +++ b/src/ui/controls/flex_layout.cpp @@ -5,12 +5,10 @@ namespace cru::ui::controls { using render::FlexLayoutRenderObject; -FlexLayout::FlexLayout() { render_object_ = new FlexLayoutRenderObject(); } - -FlexLayout::~FlexLayout() { delete render_object_; } +FlexLayout::FlexLayout() { render_object_.reset(new FlexLayoutRenderObject()); } render::RenderObject* FlexLayout::GetRenderObject() const { - return render_object_; + return render_object_.get(); } void FlexLayout::OnAddChild(Control* child, int position) { |