mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:43:22 +08:00
Merge pull request #28153 from frenzibyte/fix-resharper-inspection
Use `MustDisposeResource` annotation to appease new ReSharper inspection
This commit is contained in:
commit
ad33647721
@ -6,6 +6,7 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using Realms;
|
using Realms;
|
||||||
using Realms.Schema;
|
using Realms.Schema;
|
||||||
|
|
||||||
@ -15,8 +16,12 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
private IList<T> emptySet => Array.Empty<T>();
|
private IList<T> emptySet => Array.Empty<T>();
|
||||||
|
|
||||||
|
[MustDisposeResource]
|
||||||
public IEnumerator<T> GetEnumerator() => emptySet.GetEnumerator();
|
public IEnumerator<T> GetEnumerator() => emptySet.GetEnumerator();
|
||||||
|
|
||||||
|
[MustDisposeResource]
|
||||||
IEnumerator IEnumerable.GetEnumerator() => emptySet.GetEnumerator();
|
IEnumerator IEnumerable.GetEnumerator() => emptySet.GetEnumerator();
|
||||||
|
|
||||||
public int Count => emptySet.Count;
|
public int Count => emptySet.Count;
|
||||||
public T this[int index] => emptySet[index];
|
public T this[int index] => emptySet[index];
|
||||||
public int IndexOf(object? item) => item == null ? -1 : emptySet.IndexOf((T)item);
|
public int IndexOf(object? item) => item == null ? -1 : emptySet.IndexOf((T)item);
|
||||||
|
Loading…
Reference in New Issue
Block a user