More review

pull/6096/head
cvium 3 years ago
parent cfba7daa50
commit 9111730a0a

@ -1073,10 +1073,7 @@ namespace Emby.Server.Implementations.Data
}
// Extremely unlikely, but somehow one or more of the image strings were malformed. Cut the array.
var newResult = new ItemImageInfo[position];
Array.Copy(result, newResult, position);
return newResult;
return result[..position];
}
private void AppendItemImageInfo(StringBuilder bldr, ItemImageInfo image)

@ -17,7 +17,8 @@ namespace MediaBrowser.Common.Extensions
/// <returns>The updated string builder.</returns>
public static StringBuilder AppendJoinInSingleQuotes(this StringBuilder builder, char delimiter, IReadOnlyList<string> values)
{
for (var i = 0; i < values.Count; i++)
var len = values.Count;
for (var i = 0; i < len; i++)
{
builder.Append('\'')
.Append(values[i])

Loading…
Cancel
Save