Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev
2025-05-30 17:08:34 -05:00
committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View File

@@ -222,7 +222,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
{
seconds = 0;
bool isValid = GetNum(name, ref namePosition, out int num, 0, HoursPerDays * DaysPerWeek - 1);
if (!isValid)
{
@@ -264,6 +263,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
seconds += num;
}
}
return true;
}
@@ -486,7 +486,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
return false;
}
if (name[namePosition] != '\0' && name[namePosition] != ',' && name[namePosition] != ';')
if (name[namePosition] is not (byte)'\0' and not (byte)',' and not (byte)';')
{
bool isValid = GetOffset(name.ToArray(), ref namePosition, ref dstOffset);
@@ -506,7 +506,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
namePosition = 0;
}
if (name[namePosition] == ',' || name[namePosition] == ';')
if (name[namePosition] is (byte)',' or (byte)';')
{
namePosition++;
@@ -744,6 +744,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
{
outRules.Chars[charsPosition + i] = destName[i];
}
outRules.Chars[charsPosition + destLen] = 0;
}
@@ -763,6 +764,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
{
value += SecondsPerDay;
}
break;
case RuleType.DayOfYear:
@@ -923,7 +925,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
return false;
}
if (streamLength < (timeCount * TimeTypeSize
+ timeCount
+ typeCount * 6
@@ -1051,7 +1052,6 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
outRules.Ttis[i].IsGMT = p[0] != 0;
p = p[1..];
}
}
long position = (workBuffer.Length - p.Length);
@@ -1554,7 +1554,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
int savedSeconds;
if (calendarTime.Second >= 0 && calendarTime.Second < SecondsPerMinute)
if (calendarTime.Second is >= 0 and < SecondsPerMinute)
{
savedSeconds = 0;
}