1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 16:03:01 +08:00

Fix a few new inspections in latest Rider EAP

This commit is contained in:
Dean Herbert 2019-04-01 11:39:02 +09:00
parent 79b5c2482b
commit 7d6a08d6da
5 changed files with 26 additions and 12 deletions

View File

@ -199,6 +199,7 @@ namespace osu.Game.Rulesets.Osu.Replays
// Wait until Auto could "see and react" to the next note. // Wait until Auto could "see and react" to the next note.
double waitTime = h.StartTime - Math.Max(0.0, h.TimePreempt - reactionTime); double waitTime = h.StartTime - Math.Max(0.0, h.TimePreempt - reactionTime);
if (waitTime > lastFrame.Time) if (waitTime > lastFrame.Time)
{ {
lastFrame = new OsuReplayFrame(waitTime, lastFrame.Position) { Actions = lastFrame.Actions }; lastFrame = new OsuReplayFrame(waitTime, lastFrame.Position) { Actions = lastFrame.Actions };
@ -292,7 +293,6 @@ namespace osu.Game.Rulesets.Osu.Replays
{ {
// We add intermediate frames for spinning / following a slider here. // We add intermediate frames for spinning / following a slider here.
case Spinner spinner: case Spinner spinner:
{
Vector2 difference = startPosition - SPINNER_CENTRE; Vector2 difference = startPosition - SPINNER_CENTRE;
float radius = difference.Length; float radius = difference.Length;
@ -315,9 +315,8 @@ namespace osu.Game.Rulesets.Osu.Replays
endFrame.Position = endPosition; endFrame.Position = endPosition;
break; break;
}
case Slider slider: case Slider slider:
{
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay) for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
{ {
Vector2 pos = slider.StackedPositionAt(j / slider.Duration); Vector2 pos = slider.StackedPositionAt(j / slider.Duration);
@ -327,7 +326,6 @@ namespace osu.Game.Rulesets.Osu.Replays
AddFrameToReplay(new OsuReplayFrame(slider.EndTime, new Vector2(slider.StackedEndPosition.X, slider.StackedEndPosition.Y), action)); AddFrameToReplay(new OsuReplayFrame(slider.EndTime, new Vector2(slider.StackedEndPosition.X, slider.StackedEndPosition.Y), action));
break; break;
} }
}
// We only want to let go of our button if we are at the end of the current replay. Otherwise something is still going on after us so we need to keep the button pressed! // We only want to let go of our button if we are at the end of the current replay. Otherwise something is still going on after us so we need to keep the button pressed!
if (Frames[Frames.Count - 1].Time <= endFrame.Time) if (Frames[Frames.Count - 1].Time <= endFrame.Time)

View File

@ -0,0 +1,16 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Graphics.Sprites;
namespace osu.Game.Tests.Visual
{
public class TestCaseCharLookup : OsuTestCase
{
public TestCaseCharLookup()
{
AddStep("null", () => { });
AddStep("display acharacter", () => Add(new OsuSpriteText { Text = "振込申請" }));
}
}
}

View File

@ -88,6 +88,7 @@ namespace osu.Game.Scoring.Legacy
throw new IOException("input .lzma is too short"); throw new IOException("input .lzma is too short");
long outSize = 0; long outSize = 0;
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
int v = replayInStream.ReadByte(); int v = replayInStream.ReadByte();
@ -144,6 +145,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D; score.Rank = ScoreRank.D;
break; break;
} }
case 1: case 1:
{ {
int totalHits = count50 + count100 + count300 + countMiss; int totalHits = count50 + count100 + count300 + countMiss;
@ -166,6 +168,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D; score.Rank = ScoreRank.D;
break; break;
} }
case 2: case 2:
{ {
int totalHits = count50 + count100 + count300 + countMiss + countKatu; int totalHits = count50 + count100 + count300 + countMiss + countKatu;
@ -185,6 +188,7 @@ namespace osu.Game.Scoring.Legacy
score.Rank = ScoreRank.D; score.Rank = ScoreRank.D;
break; break;
} }
case 3: case 3:
{ {
int totalHits = count50 + count100 + count300 + countMiss + countGeki + countKatu; int totalHits = count50 + count100 + count300 + countMiss + countGeki + countKatu;

View File

@ -16,12 +16,11 @@ namespace osu.Game.Skinning
{ {
line = StripComments(line); line = StripComments(line);
var pair = SplitKeyVal(line);
switch (section) switch (section)
{ {
case Section.General: case Section.General:
{
var pair = SplitKeyVal(line);
switch (pair.Key) switch (pair.Key)
{ {
case @"Name": case @"Name":
@ -36,11 +35,8 @@ namespace osu.Game.Skinning
} }
break; break;
}
case Section.Fonts:
{
var pair = SplitKeyVal(line);
case Section.Fonts:
switch (pair.Key) switch (pair.Key)
{ {
case "HitCirclePrefix": case "HitCirclePrefix":
@ -53,7 +49,6 @@ namespace osu.Game.Skinning
break; break;
} }
}
base.ParseLine(skin, section, line); base.ParseLine(skin, section, line);
} }

View File

@ -230,6 +230,7 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_CONSTRAINS/@EntryValue">True</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_CONSTRAINS/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/@EntryValue">True</s:Boolean> <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_BEFORE_BLOCK_STATEMENTS/@EntryValue">1</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String> <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64> <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_CODE/@EntryValue">1</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64> <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue">1</s:Int64>