[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)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Tue, 19 Oct 2021 06:39:53 +0000 (15:39 +0900)
commit2f6cf3624440c297fbd728baa8db1e065d2ac4c2
treeb48239de9d576b6490b420153ef432b1f8b01835
parent2ca360912665180286aa94dba163337cf4ddcffb
[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