Avoid format strings in some places.
Where it is possible to directly concat strings, prefer this in some often-called methods.
This commit is contained in:
committed by
Matthias Mailänder
parent
f78c3bef33
commit
5b51f2a0fa
@@ -82,7 +82,7 @@ namespace OpenRA.Support
|
|||||||
var label = type == typeof(string) || type.IsGenericType ? item.ToString() : type.Name;
|
var label = type == typeof(string) || type.IsGenericType ? item.ToString() : type.Name;
|
||||||
Log.Write("perf", FormatString,
|
Log.Write("perf", FormatString,
|
||||||
1000f * (endStopwatchTicks - startStopwatchTicks) / Stopwatch.Frequency,
|
1000f * (endStopwatchTicks - startStopwatchTicks) / Stopwatch.Frequency,
|
||||||
"[{0}] {1}: {2}".F(Game.LocalTick, name, label));
|
"[" + Game.LocalTick + "] " + name + ": " + label);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long LongTickThresholdInStopwatchTicks
|
public static long LongTickThresholdInStopwatchTicks
|
||||||
|
|||||||
@@ -475,6 +475,6 @@ namespace OpenRA
|
|||||||
public bool Equals(TraitPair<T> other) { return this == other; }
|
public bool Equals(TraitPair<T> other) { return this == other; }
|
||||||
public override bool Equals(object obj) { return obj is TraitPair<T> && Equals((TraitPair<T>)obj); }
|
public override bool Equals(object obj) { return obj is TraitPair<T> && Equals((TraitPair<T>)obj); }
|
||||||
|
|
||||||
public override string ToString() { return "{0}->{1}".F(Actor.Info.Name, Trait.GetType().Name); }
|
public override string ToString() { return Actor.Info.Name + "->" + Trait.GetType().Name; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user