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

Commit

Permalink
fix compilation error when profile changed
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Jul 21, 2018
1 parent fec2a54 commit e9ee597
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
7 changes: 6 additions & 1 deletion Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
#if CSHARP_7_OR_LATER
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

using System;
using System.Threading;

namespace UniRx.Async.Internal
Expand Down Expand Up @@ -105,3 +108,5 @@ public void OnCompleted(Action continuation)
}
}
}

#endif
19 changes: 12 additions & 7 deletions Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if NET_4_6 || NET_STANDARD_2_0
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

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

public MinimumQueue(int capacity)
{
if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity));
if (capacity < 0) throw new ArgumentOutOfRangeException("capacity");
array = new T[capacity];
head = tail = size = 0;
}

public int Count
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#if NET_4_6 || NET_STANDARD_2_0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
get { return size; }
}

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

#if NET_4_6 || NET_STANDARD_2_0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
public void Enqueue(T item)
{
if (size == array.Length)
Expand All @@ -49,7 +52,9 @@ public void Enqueue(T item)
size++;
}

#if NET_4_6 || NET_STANDARD_2_0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
public T Dequeue()
{
if (size == 0) ThrowForEmptyQueue();
Expand Down Expand Up @@ -94,7 +99,9 @@ void SetCapacity(int capacity)
tail = (size == capacity) ? 0 : size;
}

#if NET_4_6 || NET_STANDARD_2_0
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
void MoveNext(ref int index)
{
int tmp = index + 1;
Expand All @@ -110,6 +117,4 @@ void ThrowForEmptyQueue()
throw new InvalidOperationException("EmptyQueue");
}
}
}

#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using UniRx.Async;
#endif

#pragma warning disable CS1591

namespace UniRx
{
public interface IReactiveCommand<T> : IObservable<T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma warning disable CS1591

using System;
using System;
using System.Collections.Generic;
using System.Threading;
#if !UniRxLibrary
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/Tests/_AsyncTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
using UniRx;
using UniRx.Async;
using UnityEngine.SceneManagement;
#if CSHARP_7_OR_LATER
using System.Threading.Tasks;
#endif
using UnityEngine.Networking;
using UnityEngine.Experimental.LowLevel;
using Unity.Jobs;
Expand Down
4 changes: 1 addition & 3 deletions Assets/Scripts/Tests/_ManualyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ public void AsyncSandbox()

}

#endif

#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
#endif

0 comments on commit e9ee597

Please sign in to comment.