[NUI] Fix some svace issues.
authorhuayong.xu <huayong.xu@samsung.com>
Tue, 20 Jun 2023 01:14:48 +0000 (09:14 +0800)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 21 Jun 2023 03:04:41 +0000 (12:04 +0900)
src/Tizen.NUI.Components/Controls/FlexibleView/LinearLayoutManager.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Layouter/GridLayouter.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Layouter/LinearLayouter.cs
src/Tizen.NUI.Wearable/src/public/RecyclerView/GridRecycleLayoutManager.cs
src/Tizen.NUI.Wearable/src/public/RecyclerView/LinearRecycleLayoutManager.cs
src/Tizen.NUI.Wearable/src/public/RecyclerView/RecyclerView.cs
src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs
src/Tizen.NUI/src/public/BaseComponents/DirectRenderingGLView.cs
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs
src/Tizen.NUI/src/public/Rendering/VertexBuffer.cs

index 39610fb123e1da4b547d0a60e272027f0dba84a4..26a6da54e06e8dbc41eaee52153770f94c2df081 100755 (executable)
@@ -425,6 +425,8 @@ namespace Tizen.NUI.Components
                             return position + 1;
                         }
                         break;
+                    default:
+                        break;
                 }
             }
             else
@@ -443,6 +445,8 @@ namespace Tizen.NUI.Components
                             return position + 1;
                         }
                         break;
+                    default:
+                        break;
                 }
             }
 
index b90d617a04b6740f05727d8db99c8d4bbd60c9ef..0bdd97e9c8b1341a218fd2229bb507ee92203ae9 100755 (executable)
@@ -1295,6 +1295,8 @@ namespace Tizen.NUI.Components
                         targetSibling = IsHorizontal ? targetSibling : currentFocusedView.SiblingOrder + 1;
                         break;
                     }
+                default:
+                    break;
             }
 
             if (targetSibling > -1 && targetSibling < Container.Children.Count)
index 7504e0954e5b01a7c4f5aeb7e55dccf34521c842..b63c6a6a90d82579887971db0d26c51fd2f6585f 100755 (executable)
@@ -1498,6 +1498,8 @@ namespace Tizen.NUI.Components
                         targetSibling = IsHorizontal? targetSibling : currentFocusedView.SiblingOrder + 1;
                         break;
                     }
+                default:
+                    break;
             }
 
             if (targetSibling > -1 && targetSibling < Container.Children.Count)
index 9d1b762ee874c5c0a931219e23b51745deace53c..37c209b2b868fab32d97f9aeb13d69f387c9ecc9 100755 (executable)
@@ -289,6 +289,8 @@ namespace Tizen.NUI.Wearable
                         targetSibling = isHorizontal ? currentFocusedView.SiblingOrder + Columns : currentFocusedView.SiblingOrder + 1;
                         break;
                     }
+                default:
+                    break;
             }
 
             if (targetSibling > -1 && targetSibling < Container.Children.Count)
index 4f8573edb2353c51f81442d78093b8dfeece7c9d..9c3366f721a1b6d165ba2e37635b651c7632ddff 100755 (executable)
@@ -216,6 +216,8 @@ namespace Tizen.NUI.Wearable
                         targetSibling = isHorizontal ? targetSibling : currentFocusedView.SiblingOrder + 1;
                         break;
                     }
+                default:
+                    break;
             }
 
             if (targetSibling > -1 && targetSibling < Container.Children.Count)
index 611f334d52fb96058ff53f6b2419bd86f7bb5bf9..94e2c2d497d3ee5b23f7f01884d9854de52785d3 100755 (executable)
@@ -355,6 +355,8 @@ namespace Tizen.NUI.Wearable
                             nextFocusedView = DownFocusableView;
                             break;
                         }
+                    default:
+                        break;
                 }
 
                 if (nextFocusedView)
index a2396175783d4adae0546c7ce2bdbbd6945d2caf..78d342607e57f04844e4f7ca81e95ca360a70e74 100755 (executable)
@@ -99,16 +99,19 @@ namespace Tizen.NUI.Binding
             object sourceObject;
             if (_weakSource != null && _weakSource.TryGetTarget(out sourceObject))
             {
-                for (var i = 0; i < _parts.Count - 1; i++)
+                if (_parts.Count > 1)
                 {
-                    BindingExpressionPart part = _parts[i];
-
-                    if (!part.IsSelf)
+                    for (var i = 0; i < _parts.Count - 1; i++)
                     {
-                        part.TryGetValue(sourceObject, out sourceObject);
-                    }
+                        BindingExpressionPart part = _parts[i];
+
+                        if (!part.IsSelf)
+                        {
+                            part.TryGetValue(sourceObject, out sourceObject);
+                        }
 
-                    part.Unsubscribe();
+                        part.Unsubscribe();
+                    }
                 }
             }
 
index 79196fa2d485ad20ed3fcb7872b78f865761e1be..d98bb173beefa7517e1d76ab2c47661fdf99062b 100644 (file)
@@ -182,7 +182,7 @@ namespace Tizen.NUI.BaseComponents
         {
             unsafe
             {
-                if (textures != null)
+                if (textures != null && textures.Count > 0)
                 {
                     IntPtr unmanagedPointer = Marshal.AllocHGlobal(sizeof(IntPtr) * textures.Count);
                     IntPtr[] texturesArray = new IntPtr[textures.Count];
index e0a3ac54f81b3777c6db1f05fb67072968315772..a6768ad498d66908ac0dab616686f78fe383c830 100755 (executable)
@@ -250,6 +250,8 @@ namespace Tizen.NUI
                             childLayout.ConditionForAnimation = TransitionCondition.LayoutChanged;
                             break;
                         }
+                    default:
+                        break;
                 }
             }
 
index ff52faebb2affc3fb22feddb6072f33b751360c5..71a0a23bb1073489c18eed4c13ecc84288c1342b 100755 (executable)
@@ -49,12 +49,12 @@ namespace Tizen.NUI
         /// This function expects an array of structures with the same format that was given in the construction.
         /// </summary>
         /// <param name="vertices">The vertex data that will be copied to the buffer.</param>
-        /// <exception cref="ArgumentNullException"> Thrown when vertices is null. </exception>
+        /// <exception cref="ArgumentNullException"> Thrown when vertices is null or length of the vertices is 0. </exception>
         /// <since_tizen> 8 </since_tizen>
 
         public void SetData<VertexType>(VertexType[] vertices) where VertexType : struct
         {
-            if (null == vertices)
+            if (null == vertices || vertices.Length == 0)
             {
                 throw new ArgumentNullException(nameof(vertices));
             }