Renormalize line endings and fix copyright headers again.

This commit is contained in:
Paul Chote
2011-04-07 21:15:42 +12:00
parent 1a49b46af1
commit b0425aff3b
144 changed files with 8076 additions and 7746 deletions

View File

@@ -21,8 +21,8 @@ namespace OpenRA.FileFormats
{
public struct SourceLocation
{
public string Filename; public int Line;
public override string ToString() { return "{0}:{1}".F(Filename, Line); }
public string Filename; public int Line;
public override string ToString() { return "{0}:{1}".F(Filename, Line); }
}
public SourceLocation Location;
@@ -53,11 +53,11 @@ namespace OpenRA.FileFormats
public MiniYamlNode( string k, string v, List<MiniYamlNode> n, SourceLocation loc )
: this( k, new MiniYaml( v, n ), loc )
{
}
public override string ToString()
{
return "{{YamlNode: {0} @ {1}}}".F(Key, Location);
}
public override string ToString()
{
return "{{YamlNode: {0} @ {1}}}".F(Key, Location);
}
}
@@ -175,8 +175,8 @@ namespace OpenRA.FileFormats
var aDict = a.ToDictionary( x => x.Key );
var bDict = b.ToDictionary( x => x.Key );
var keys = aDict.Keys.Union( bDict.Keys ).ToList();
var keys = aDict.Keys.Union( bDict.Keys ).ToList();
var noInherit = keys.Where(x => x.Length > 0 && x[0] == '-')
.ToDictionary(x => x.Substring(1), x => false);
@@ -189,7 +189,7 @@ namespace OpenRA.FileFormats
if( noInherit.ContainsKey( key ) )
{
// if( aa != null )
// ret.Add( aa );
// ret.Add( aa );
noInherit[key] = true;
}
else
@@ -198,10 +198,10 @@ namespace OpenRA.FileFormats
var merged = ( aa == null || bb == null ) ? aa ?? bb : new MiniYamlNode( key, Merge( aa.Value, bb.Value ), loc );
ret.Add( merged );
}
}
if (noInherit.ContainsValue(false))
throw new YamlException("Bogus yaml removals: {0}".F(
}
if (noInherit.ContainsValue(false))
throw new YamlException("Bogus yaml removals: {0}".F(
string.Join(", ", noInherit.Where(x => !x.Value).Select(x => x.Key).ToArray())));
return ret;
@@ -248,10 +248,10 @@ namespace OpenRA.FileFormats
yield return "";
}
}
}
public class YamlException : Exception
{
public YamlException(string s) : base(s) { }
}
public class YamlException : Exception
{
public YamlException(string s) : base(s) { }
}
}