Enforce use of 'var' instead of explicit type.
This commit is contained in:
committed by
Matthias Mailänder
parent
982c97dc6c
commit
19ecddcd86
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
{
|
||||
var knownKeys = new HashSet<TKey>();
|
||||
foreach (TSource element in source)
|
||||
foreach (var element in source)
|
||||
{
|
||||
if (knownKeys.Add(keySelector(element)))
|
||||
yield return element;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
return PrintUsage();
|
||||
|
||||
var invalid = false;
|
||||
for (int i = 1; i < args.Length; i++)
|
||||
for (var i = 1; i < args.Length; i++)
|
||||
{
|
||||
var parts = args[i].Split(Comma, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length != 3 && parts.Length != 4)
|
||||
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
[Desc("Convert r,g,b[,a] triples/quads into hex colors")]
|
||||
void IUtilityCommand.Run(Utility utility, string[] args)
|
||||
{
|
||||
for (int i = 1; i < args.Length;)
|
||||
for (var i = 1; i < args.Length;)
|
||||
{
|
||||
var parts = args[i].Split(Comma, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length == 3)
|
||||
@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
return PrintUsage();
|
||||
|
||||
var invalid = false;
|
||||
for (int i = 1; i < args.Length; i++)
|
||||
for (var i = 1; i < args.Length; i++)
|
||||
{
|
||||
var parts = args[i].Split(Comma, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length != 3 && parts.Length != 4)
|
||||
@@ -180,7 +180,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
[Desc("Convert a,r,g,b legacy colors into hex colors")]
|
||||
void IUtilityCommand.Run(Utility utility, string[] args)
|
||||
{
|
||||
for (int i = 1; i < args.Length;)
|
||||
for (var i = 1; i < args.Length;)
|
||||
{
|
||||
var parts = args[i].Split(Comma, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length == 3)
|
||||
|
||||
Reference in New Issue
Block a user