1
1
#pragma warning disable CS1591
2
2
3
3
using System ;
4
- using System . Linq ;
5
4
using System . Diagnostics ;
5
+ using System . Linq ;
6
6
using System . Runtime . CompilerServices ;
7
7
8
8
namespace Fractural . Tasks . CompilerServices
@@ -56,9 +56,6 @@ internal sealed class AsyncGDTaskVoid<TStateMachine> : IStateMachineRunner, ITas
56
56
public AsyncGDTaskVoid ( )
57
57
{
58
58
MoveNext = Run ;
59
- #if ENABLE_IL2CPP
60
- ReturnAction = Return ;
61
- #endif
62
59
}
63
60
64
61
public static void SetStateMachine ( ref TStateMachine stateMachine , ref IStateMachineRunner runnerFieldRef )
@@ -120,10 +117,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
120
117
where TStateMachine : IAsyncStateMachine
121
118
{
122
119
static TaskPool < AsyncGDTask < TStateMachine > > pool ;
123
-
124
- #if ENABLE_IL2CPP
125
- readonly Action returnDelegate ;
126
- #endif
127
120
public Action MoveNext { get ; }
128
121
129
122
TStateMachine stateMachine ;
@@ -132,9 +125,6 @@ internal sealed class AsyncGDTask<TStateMachine> : IStateMachineRunnerPromise, I
132
125
AsyncGDTask ( )
133
126
{
134
127
MoveNext = Run ;
135
- #if ENABLE_IL2CPP
136
- returnDelegate = Return ;
137
- #endif
138
128
}
139
129
140
130
public static void SetStateMachine ( ref TStateMachine stateMachine , ref IStateMachineRunnerPromise runnerPromiseFieldRef )
@@ -210,12 +200,7 @@ public void GetResult(short token)
210
200
}
211
201
finally
212
202
{
213
- #if ENABLE_IL2CPP
214
- // workaround for IL2CPP bug.
215
- PlayerLoopHelper . AddContinuation ( PlayerLoopTiming . LastPostLateUpdate , returnDelegate ) ;
216
- #else
217
203
TryReturn ( ) ;
218
- #endif
219
204
}
220
205
}
221
206
@@ -243,10 +228,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
243
228
{
244
229
static TaskPool < AsyncGDTask < TStateMachine , T > > pool ;
245
230
246
- #if ENABLE_IL2CPP
247
- readonly Action returnDelegate ;
248
- #endif
249
-
250
231
public Action MoveNext { get ; }
251
232
252
233
TStateMachine stateMachine ;
@@ -255,9 +236,6 @@ internal sealed class AsyncGDTask<TStateMachine, T> : IStateMachineRunnerPromise
255
236
AsyncGDTask ( )
256
237
{
257
238
MoveNext = Run ;
258
- #if ENABLE_IL2CPP
259
- returnDelegate = Return ;
260
- #endif
261
239
}
262
240
263
241
public static void SetStateMachine ( ref TStateMachine stateMachine , ref IStateMachineRunnerPromise < T > runnerPromiseFieldRef )
@@ -333,12 +311,7 @@ public T GetResult(short token)
333
311
}
334
312
finally
335
313
{
336
- #if ENABLE_IL2CPP
337
- // workaround for IL2CPP bug.
338
- PlayerLoopHelper . AddContinuation ( PlayerLoopTiming . LastPostLateUpdate , returnDelegate ) ;
339
- #else
340
314
TryReturn ( ) ;
341
- #endif
342
315
}
343
316
}
344
317
0 commit comments