beef up OpenRA.FileFormats.Set a little; use it in CncMenuPaletteEffect rather than making new List<string> every frame
This commit is contained in:
@@ -12,7 +12,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA.Collections
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
public class Set<T> : IEnumerable<T>
|
||||
{
|
||||
@@ -44,5 +44,13 @@ namespace OpenRA.Collections
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool Contains( T obj ) { return data.ContainsKey(obj); }
|
||||
|
||||
public Set( params T[] ts )
|
||||
{
|
||||
foreach( var t in ts )
|
||||
Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user