1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed unassigned-out errors

This commit is contained in:
Brian Fiete 2022-02-14 06:56:54 -05:00
parent 43d8677598
commit a4b1ff8a72

View file

@ -551,6 +551,7 @@ namespace System.Linq
return true; return true;
} }
val = default;
return false; return false;
} }
@ -591,6 +592,7 @@ namespace System.Linq
internal static bool InternalLast<TEnum, TSource>(TEnum items, out TSource val) internal static bool InternalLast<TEnum, TSource>(TEnum items, out TSource val)
where TEnum : concrete, IEnumerator<TSource> where TEnum : concrete, IEnumerator<TSource>
{ {
val = ?;
var found = false; var found = false;
using (var iterator = Iterator.Wrap(items)) using (var iterator = Iterator.Wrap(items))
{ {
@ -602,6 +604,8 @@ namespace System.Linq
val = temp; val = temp;
} }
if (!found)
val = default;
return found; return found;
} }
@ -657,6 +661,7 @@ namespace System.Linq
} }
} }
val = default;
return false; return false;
} }