LinkedList statt HashSet für Blöcke
This commit is contained in:
@@ -76,7 +76,7 @@ namespace WorldOfPeacecraft
|
|||||||
private class Block
|
private class Block
|
||||||
{
|
{
|
||||||
private string Name;
|
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> ();
|
private Dictionary<String, String> Values = new Dictionary<String, String> ();
|
||||||
|
|
||||||
public Block (String[] message, int start, int end)
|
public Block (String[] message, int start, int end)
|
||||||
@@ -99,7 +99,7 @@ namespace WorldOfPeacecraft
|
|||||||
else if (message [pos].StartsWith ("begin:"))
|
else if (message [pos].StartsWith ("begin:"))
|
||||||
begins++;
|
begins++;
|
||||||
}
|
}
|
||||||
Blocks.Add (new Block (message, blockstart, pos));
|
Blocks.AddLast (new Block (message, blockstart, pos));
|
||||||
} else {
|
} else {
|
||||||
// It's a value
|
// It's a value
|
||||||
string name = StringUtils.SubstringBefore (message [pos], ":");
|
string name = StringUtils.SubstringBefore (message [pos], ":");
|
||||||
@@ -115,7 +115,7 @@ namespace WorldOfPeacecraft
|
|||||||
return Name;
|
return Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISet<Block> GetBlocks ()
|
public LinkedList<Block> GetBlocks ()
|
||||||
{
|
{
|
||||||
return Blocks;
|
return Blocks;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user