mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Sprinkle some raw string prefixes
This commit is contained in:
parent
f7bea00564
commit
ae9a2661ac
@ -431,7 +431,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<string> keys = new List<string> { "seconds", "minutes", "hours", "days", "months", "years" };
|
List<string> keys = new List<string> { @"seconds", @"minutes", @"hours", @"days", @"months", @"years" };
|
||||||
|
|
||||||
foreach (string key in keys)
|
foreach (string key in keys)
|
||||||
{
|
{
|
||||||
@ -445,27 +445,27 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case "seconds":
|
case @"seconds":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddSeconds(-length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddSeconds(-length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "minutes":
|
case @"minutes":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddMinutes(-length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddMinutes(-length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "hours":
|
case @"hours":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddHours(-length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddHours(-length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "days":
|
case @"days":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddDays(-length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddDays(-length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "months":
|
case @"months":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddMonths(-(int)length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddMonths(-(int)length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "years":
|
case @"years":
|
||||||
dateTimeOffset = (dateTimeOffset ?? now).AddYears(-(int)length);
|
dateTimeOffset = (dateTimeOffset ?? now).AddYears(-(int)length);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user