LinkedList statt HashSet für Blöcke

This commit is contained in:
2014-04-04 09:19:41 +02:00
parent 8431063bc8
commit 1ac2fd448e

View File

@@ -76,7 +76,7 @@ namespace WorldOfPeacecraft
private class Block
{
private string Name;
private ISet<Block> Blocks = new HashSet<Block> ();
private LinkedList<Block> Blocks = new LinkedList<Block> ();
private Dictionary<String, String> Values = new Dictionary<String, String> ();
public Block (String[] message, int start, int end)
@@ -99,7 +99,7 @@ namespace WorldOfPeacecraft
else if (message [pos].StartsWith ("begin:"))
begins++;
}
Blocks.Add (new Block (message, blockstart, pos));
Blocks.AddLast (new Block (message, blockstart, pos));
} else {
// It's a value
string name = StringUtils.SubstringBefore (message [pos], ":");
@@ -115,7 +115,7 @@ namespace WorldOfPeacecraft
return Name;
}
public ISet<Block> GetBlocks ()
public LinkedList<Block> GetBlocks ()
{
return Blocks;
}