提交 5357afd9 编写于 作者: A Adam Speight 提交者: Neal Gafter

Small optimisation in CompilerOptionParseUtilities.cs (#13975)

Just return the array from the `.Split` function as array implements `IList`
上级 99238df8
......@@ -19,14 +19,7 @@ public static IList<string> ParseFeatureFromMSBuild(string features)
return SpecializedCollections.EmptyList<string>();
}
var all = features.Split(new[] { ';', ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
var list = new List<string>(capacity: all.Length);
foreach (var feature in all)
{
list.Add(feature);
}
return list;
return features.Split(new[] { ';', ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
}
public static ImmutableDictionary<string, string> ParseFeatures(List<string> values)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册