remove Deconstruct of KeyValuePair

This commit is contained in:
ousttrue 2022-02-14 19:53:16 +09:00
parent 570b56a52c
commit f6eb38fa4e
4 changed files with 10 additions and 27 deletions

View File

@ -1,13 +0,0 @@
using System.Collections.Generic;
namespace UniGLTF
{
public static class KeyValuePairExtensions
{
public static void Deconstruct<T, U>(this KeyValuePair<T, U> pair, out T key, out U value)
{
key = pair.Key;
value = pair.Value;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: be00d5fb3e17dbf4e87ec4a7aae8dbc3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Numerics;
using UniGLTF;
namespace VrmLib
{
/// <summary>
@ -160,8 +161,10 @@ namespace VrmLib
list.Clear();
var min = float.PositiveInfinity;
foreach (var (curve, index) in curves)
foreach (var kv in curves)
{
var curve = kv.Key;
var index = kv.Value;
var keyframe = new KeyFrameReference(curve, index);
var seconds = keyframe.Seconds;
if (seconds < min)

View File

@ -450,8 +450,10 @@ namespace VrmLib
{
foreach (var m in g.Meshes)
{
foreach (var (k, v) in m.VertexBuffer)
foreach (var kv in m.VertexBuffer)
{
var k = kv.Key;
var v = kv.Value;
if (k == VertexBuffer.PositionKey || k == VertexBuffer.NormalKey)
{
if (unique.Add(v.Bytes))
@ -485,8 +487,10 @@ namespace VrmLib
foreach (var mt in m.MorphTargets)
{
foreach (var (k, v) in mt.VertexBuffer)
foreach (var kv in mt.VertexBuffer)
{
var k = kv.Key;
var v = kv.Value;
if (k == VertexBuffer.PositionKey || k == VertexBuffer.NormalKey)
{
if (unique.Add(v.Bytes))