Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit e9ee597

Browse files
committed
fix compilation error when profile changed
1 parent fec2a54 commit e9ee597

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
#if CSHARP_7_OR_LATER
2+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
3+
4+
using System;
25
using System.Threading;
36

47
namespace UniRx.Async.Internal
@@ -105,3 +108,5 @@ public void OnCompleted(Action continuation)
105108
}
106109
}
107110
}
111+
112+
#endif

Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if NET_4_6 || NET_STANDARD_2_0
2-
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
1+
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
32

43
using System;
54
using System.Runtime.CompilerServices;
@@ -19,14 +18,16 @@ public class MinimumQueue<T>
1918

2019
public MinimumQueue(int capacity)
2120
{
22-
if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity));
21+
if (capacity < 0) throw new ArgumentOutOfRangeException("capacity");
2322
array = new T[capacity];
2423
head = tail = size = 0;
2524
}
2625

2726
public int Count
2827
{
29-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
28+
#if NET_4_6 || NET_STANDARD_2_0
29+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
30+
#endif
3031
get { return size; }
3132
}
3233

@@ -36,7 +37,9 @@ public T Peek()
3637
return array[head];
3738
}
3839

40+
#if NET_4_6 || NET_STANDARD_2_0
3941
[MethodImpl(MethodImplOptions.AggressiveInlining)]
42+
#endif
4043
public void Enqueue(T item)
4144
{
4245
if (size == array.Length)
@@ -49,7 +52,9 @@ public void Enqueue(T item)
4952
size++;
5053
}
5154

55+
#if NET_4_6 || NET_STANDARD_2_0
5256
[MethodImpl(MethodImplOptions.AggressiveInlining)]
57+
#endif
5358
public T Dequeue()
5459
{
5560
if (size == 0) ThrowForEmptyQueue();
@@ -94,7 +99,9 @@ void SetCapacity(int capacity)
9499
tail = (size == capacity) ? 0 : size;
95100
}
96101

102+
#if NET_4_6 || NET_STANDARD_2_0
97103
[MethodImpl(MethodImplOptions.AggressiveInlining)]
104+
#endif
98105
void MoveNext(ref int index)
99106
{
100107
int tmp = index + 1;
@@ -110,6 +117,4 @@ void ThrowForEmptyQueue()
110117
throw new InvalidOperationException("EmptyQueue");
111118
}
112119
}
113-
}
114-
115-
#endif
120+
}

Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
using UniRx.Async;
55
#endif
66

7-
#pragma warning disable CS1591
8-
97
namespace UniRx
108
{
119
public interface IReactiveCommand<T> : IObservable<T>

Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#pragma warning disable CS1591
2-
3-
using System;
1+
using System;
42
using System.Collections.Generic;
53
using System.Threading;
64
#if !UniRxLibrary

Assets/Scripts/Tests/_AsyncTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
using UniRx;
1414
using UniRx.Async;
1515
using UnityEngine.SceneManagement;
16+
#if CSHARP_7_OR_LATER
1617
using System.Threading.Tasks;
18+
#endif
1719
using UnityEngine.Networking;
1820
using UnityEngine.Experimental.LowLevel;
1921
using Unity.Jobs;

Assets/Scripts/Tests/_ManualyTest.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,4 @@ public void AsyncSandbox()
3434

3535
}
3636

37-
#endif
38-
39-
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
37+
#endif

0 commit comments

Comments
 (0)