Changes for prototype load parallelization (#13066)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Pieter-Jan Briers
2022-12-20 23:25:34 +01:00
committed by GitHub
parent 584921b423
commit a323671984
50 changed files with 169 additions and 249 deletions

View File

@@ -81,7 +81,8 @@ namespace Content.Shared.Alert
if (idx == -1 && idy == -1)
{
// break ties by type value
return x.AlertType - y.AlertType;
// Must cast to int to avoid integer overflow when subtracting (enum's unsigned)
return (int)x.AlertType - (int)y.AlertType;
}
if (idx == -1) return 1;
@@ -92,7 +93,8 @@ namespace Content.Shared.Alert
if (result == 0)
{
// break ties by type value
return x.AlertType - y.AlertType;
// Must cast to int to avoid integer overflow when subtracting (enum's unsigned)
return (int)x.AlertType - (int)y.AlertType;
}
return result;