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:
parent
85648cda63
commit
62346a53b0
9 changed files with 286 additions and 109 deletions
30
IDE/src/util/DefinesSet.bf
Normal file
30
IDE/src/util/DefinesSet.bf
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue