1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 15:46:05 +02:00

Adding better support for platforms

This commit is contained in:
Brian Fiete 2019-10-01 12:46:38 -07:00
parent 85648cda63
commit 62346a53b0
9 changed files with 286 additions and 109 deletions

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
namespace IDE.util
{
class DefinesSet
{
public List<String> mDefines = new List<String>() ~ DeleteContainerAndItems!(_);
public HashSet<String> mDefinesSet = new HashSet<String>() ~ delete _;
public void Add(StringView str)
{
if (str.StartsWith("!"))
{
String removeKey = scope .(str, 1);
if (mDefinesSet.Remove(removeKey))
mDefines.Remove(removeKey);
return;
}
if (!mDefinesSet.ContainsWith(str))
{
var strCopy = new String(str);
mDefines.Add(strCopy);
mDefinesSet.Add(strCopy);
}
}
}
}