From fd61739197ec009d47da87a7cc66970a55f12db4 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 21 Nov 2025 21:43:42 +0800 Subject: Clean codes. Remove member function const in RenderObject. --- include/cru/ui/render/LayoutRenderObject.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'include/cru/ui/render/LayoutRenderObject.h') diff --git a/include/cru/ui/render/LayoutRenderObject.h b/include/cru/ui/render/LayoutRenderObject.h index 9970c16c..4010ae7c 100644 --- a/include/cru/ui/render/LayoutRenderObject.h +++ b/include/cru/ui/render/LayoutRenderObject.h @@ -20,15 +20,10 @@ class LayoutRenderObject : public RenderObject { }; protected: - LayoutRenderObject() = default; + LayoutRenderObject(std::string name) : RenderObject(std::move(name)) {} public: - CRU_DELETE_COPY(LayoutRenderObject) - CRU_DELETE_MOVE(LayoutRenderObject) - - ~LayoutRenderObject() override = default; - - Index GetChildCount() const { return static_cast(children_.size()); } + Index GetChildCount() { return static_cast(children_.size()); } RenderObject* GetChildAt(Index position) { Expects(position >= 0 && position < GetChildCount()); @@ -75,7 +70,7 @@ class LayoutRenderObject : public RenderObject { InvalidateLayout(); } - const ChildLayoutData& GetChildLayoutDataAt(Index position) const { + const ChildLayoutData& GetChildLayoutDataAt(Index position) { Expects(position >= 0 && position < GetChildCount()); return children_[position].layout_data; } -- cgit v1.2.3