[NUI] Remove unused conditional expression in LayoutGroup
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 14 Oct 2021 07:25:04 +0000 (16:25 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 9 Nov 2021 05:57:53 +0000 (14:57 +0900)
commit0bf91f791144e09c7a2eb9d4e81665746cc5038f
treeef87ceef43f883ce4efda641e81058c9376e805d
parent4e8bac803a74dcdb74afac5051125d4b9e76e91f
[NUI] Remove unused conditional expression in LayoutGroup

Since AddChildToLayoutGroup is called only if view's Layout is set, the
conditional expression is meaningless.

Owner.LayoutSet is always true, so this is unnecessary code.

GetType() is always Tizen.NUI.LayoutGroup, so the intended code might be
child.GetType() == typeof(View).

The intended code is incorrect, because any class, derived from View, is
also required to set default Layout if it does not set Layout.

If the class, derived from View, uses its own Layout instead of the
default Layout, then the class already sets its own Layout, so
child.Layout cannot be null.
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs