From 3af4c218c0e70167db23a6303d2af30aff37d2fe Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 20 Aug 2020 23:40:50 -0400 Subject: Removed a bunch of stuff; Changes --- .../Scripts/Runtime/FastAction.cs | 146 --------------------- 1 file changed, 146 deletions(-) delete mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs') diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs deleted file mode 100644 index 15012e3..0000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs +++ /dev/null @@ -1,146 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro -{ - public class FastAction - { - - LinkedList delegates = new LinkedList(); - - Dictionary> lookup = new Dictionary>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call() - { - var node = delegates.First; - while (node != null) - { - node.Value(); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a) - { - var node = delegates.First; - while (node != null) - { - node.Value(a); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a, B b) - { - var node = delegates.First; - while (node != null) - { - node.Value(a, b); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a, B b, C c) - { - var node = delegates.First; - while (node != null) - { - node.Value(a, b, c); - node = node.Next; - } - } - } -} \ No newline at end of file -- cgit v1.2.3