java-topology/defects/monogame-0003/patch/monogame-0003.patch

25 lines
1.3 KiB
Diff

# UNDF: UNDF-2026-000000943
--- a/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs
+++ b/MonoGame.Framework.Content.Pipeline/OpenAssetImporter.cs
@@ -217,7 +217,7 @@ namespace Microsoft.Xna.Framework.Content.Pipeline
private Dictionary<string, Matrix> _deformationBones; // The names and offset matrices of all deformation bones.
private Node _rootBone; // The node that represents the root bone.
- private List<Node> _bones = new List<Node>(); // All nodes attached to the root bone.
+ private HashSet<Node> _bones = new HashSet<Node>(); // All nodes attached to the root bone.
private Dictionary<string, FbxPivot> _pivots; // The transformation pivots.
// XNA content
@@ -1115,7 +1115,7 @@ namespace Microsoft.Xna.Framework.Content.Pipeline
- private static void GetSubtree(Node node, List<Node> list)
+ private static void GetSubtree(Node node, ICollection<Node> collection)
{
Debug.Assert(node != null);
- Debug.Assert(list != null);
+ Debug.Assert(collection != null);
- list.Add(node);
+ collection.Add(node);
foreach (var child in node.Children)
- GetSubtree(child, list);
+ GetSubtree(child, collection);
}