mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 21:55:47 +00:00
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user