1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Merge pull request #2444 from peppy/misc-fixes

Fix new detections in rider 2018.1
This commit is contained in:
Dean Herbert 2018-04-23 18:10:09 +09:00 committed by GitHub
commit 2bd2facc90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 8 deletions

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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;
@ -43,6 +44,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
public override void Add(HitObjectMask drawable)
{
if (drawable == null) throw new ArgumentNullException(nameof(drawable));
base.Add(drawable);
drawable.Selected += onMaskSelected;
@ -51,8 +54,10 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
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)

View File

@ -223,11 +223,11 @@ namespace osu.Game.Screens.Ranking
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;
@ -251,7 +251,7 @@ namespace osu.Game.Screens.Ranking
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Text = datetime.ToShortDateString(),
Text = date.ToShortDateString(),
Padding = new MarginPadding { Horizontal = 10, Vertical = 5 },
Colour = Color4.White,
},
@ -259,7 +259,7 @@ namespace osu.Game.Screens.Ranking
{
Origin = Anchor.CentreRight,
Anchor = Anchor.CentreRight,
Text = datetime.ToShortTimeString(),
Text = date.ToShortTimeString(),
Padding = new MarginPadding { Horizontal = 10, Vertical = 5 },
Colour = Color4.White,
}