Skip to content

Commit

Permalink
Merge pull request #2444 from peppy/misc-fixes
Browse files Browse the repository at this point in the history
Fix new detections in rider 2018.1
  • Loading branch information
peppy committed Apr 23, 2018
2 parents f0071ea + 1949929 commit 2bd2fac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion osu.Game/Online/API/Requests/GetMessagesRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace osu.Game.Online.API.Requests
public class GetMessagesRequest : APIRequest<List<Message>>
{
private readonly List<Channel> channels;
private long? since;
private readonly long? since;

public GetMessagesRequest(List<Channel> channels, long? sinceId)
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Online/API/Requests/GetUserRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace osu.Game.Online.API.Requests
{
public class GetUserRequest : APIRequest<User>
{
private long? userId;
private readonly long? userId;

public GetUserRequest(long? userId = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
Expand Down Expand Up @@ -43,6 +44,8 @@ public MaskContainer()

public override void Add(HitObjectMask drawable)
{
if (drawable == null) throw new ArgumentNullException(nameof(drawable));

base.Add(drawable);

drawable.Selected += onMaskSelected;
Expand All @@ -51,8 +54,10 @@ public override void Add(HitObjectMask drawable)
drawable.DragRequested += onDragRequested;
}

public override bool Remove(HitObjectMask drawable)
public override bool Remove([NotNull] HitObjectMask drawable)
{
if (drawable == null) throw new ArgumentNullException(nameof(drawable));

var result = base.Remove(drawable);

if (result)
Expand Down
10 changes: 5 additions & 5 deletions osu.Game/Screens/Ranking/ResultsPageScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ private void load(OsuColour colours)

private class DateTimeDisplay : Container
{
private DateTime datetime;
private readonly DateTime date;

public DateTimeDisplay(DateTime datetime)
public DateTimeDisplay(DateTime date)
{
this.datetime = datetime;
this.date = date;

AutoSizeAxes = Axes.Y;

Expand All @@ -251,15 +251,15 @@ private void load(OsuColour colours)
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Text = datetime.ToShortDateString(),
Text = date.ToShortDateString(),
Padding = new MarginPadding { Horizontal = 10, Vertical = 5 },
Colour = Color4.White,
},
new OsuSpriteText
{
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreRight,
Text = datetime.ToShortTimeString(),
Text = date.ToShortTimeString(),
Padding = new MarginPadding { Horizontal = 10, Vertical = 5 },
Colour = Color4.White,
}
Expand Down

0 comments on commit 2bd2fac

Please sign in to comment.