mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-22 08:08:51 -05:00
Fix Remove Tag from AtomTags and Fix Remove Tag Test (#102)
This commit is contained in:
parent
a3db8f13e9
commit
82e78f51d3
@ -141,7 +141,7 @@ namespace UnityAtoms.Tags
|
||||
public void RemoveTag(string tag)
|
||||
{
|
||||
if (tag == null) return;
|
||||
if (_sortedTags.ContainsKey(tag)) return;
|
||||
if (!_sortedTags.ContainsKey(tag)) return;
|
||||
_sortedTags.Remove(tag);
|
||||
|
||||
Tags = new ReadOnlyList<StringConstant>(_sortedTags.Values);
|
||||
|
@ -94,9 +94,11 @@ namespace UnityAtoms.Tags.Tests
|
||||
|
||||
using (new ProfilerMarker("MySystem.RemoveTag").Auto())
|
||||
{
|
||||
atomicTags.RemoveTag("b");
|
||||
atomicTags.RemoveTag(newConstant.Value);
|
||||
}
|
||||
|
||||
Assert.AreEqual(random_tags_raw.Count, atomicTags.Tags.Count);
|
||||
Assert.IsFalse(atomicTags.HasTag(newConstant.Value));
|
||||
|
||||
using (new ProfilerMarker("MySystem.AddTagAgain").Auto())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user