Replace arrays with sets.
In places where arrays were being treated as a set, just create a set directly. This reveals the intention of such collections better, and also improves performance by allowing set based methods to be used.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
@@ -16,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class LineBuildNodeInfo : TraitInfo<LineBuildNode>
|
||||
{
|
||||
[Desc("This actor is of LineBuild 'NodeType'...")]
|
||||
public readonly string[] Types = { "wall" };
|
||||
public readonly HashSet<string> Types = new HashSet<string> { "wall" };
|
||||
}
|
||||
|
||||
public class LineBuildNode { }
|
||||
|
||||
Reference in New Issue
Block a user