From 544c38dffb8d1c2366c13b243afa59e3a3a980bc Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Tue, 3 Nov 2020 21:38:38 +0100 Subject: [PATCH 1/3] Fix PriorityQueue compilation on the eval target, closes #48 --- src/polygonal/ds/PriorityQueue.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/polygonal/ds/PriorityQueue.hx b/src/polygonal/ds/PriorityQueue.hx index aef58e3..dc35f5d 100644 --- a/src/polygonal/ds/PriorityQueue.hx +++ b/src/polygonal/ds/PriorityQueue.hx @@ -288,7 +288,7 @@ class PriorityQueue implements Queue { if (isEmpty()) return []; - var out = ArrayTools.alloc(size); + var out:Array = ArrayTools.alloc(size); var t = mData.copy(); var k = size; var j = 0, i, c, v, s, u; @@ -533,7 +533,7 @@ class PriorityQueue implements Queue **/ public function toArray():Array { - return mData.toArray(1, size, []); + return NativeArrayTools.toArray(mData, 1, size, []); } /** @@ -800,4 +800,4 @@ class PriorityQueueIterator implements polygonal.ds.Itr mObject.remove(mData.get(mI - 1)); } -} \ No newline at end of file +} From 3a88d8d2838ae984fbc517292859d21c631bb329 Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Thu, 17 Dec 2020 20:50:14 +0100 Subject: [PATCH 2/3] Fix ListSet compilation on the eval target --- src/polygonal/ds/ListSet.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polygonal/ds/ListSet.hx b/src/polygonal/ds/ListSet.hx index 870ef62..55b1355 100644 --- a/src/polygonal/ds/ListSet.hx +++ b/src/polygonal/ds/ListSet.hx @@ -329,7 +329,7 @@ class ListSet implements Set **/ public function toArray():Array { - return mData.toArray(0, size, []); + return NativeArrayTools.toArray(mData, 0, size, []); } /** @@ -431,4 +431,4 @@ class ListSetIterator implements polygonal.ds.Itr mData.set(mI, mData.get(--mS)); } -} \ No newline at end of file +} From ed759d78f456e31deef37edd7210a060de10fcc5 Mon Sep 17 00:00:00 2001 From: Jens Fischer Date: Thu, 17 Dec 2020 20:52:45 +0100 Subject: [PATCH 3/3] Fix Std.is() deprecation warnings in Printf --- src/polygonal/ds/Printf.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/polygonal/ds/Printf.hx b/src/polygonal/ds/Printf.hx index 1598f00..2c07f8a 100644 --- a/src/polygonal/ds/Printf.hx +++ b/src/polygonal/ds/Printf.hx @@ -89,14 +89,14 @@ class Printf case Tag(type, tagArgs): if (tagArgs.width == null) { - if (!Std.is(args[argIndex], Int)) + if (!(args[argIndex] is Int)) throw new PrintfError("invalid 'width' argument"); tagArgs.width = args[argIndex++]; } if (tagArgs.precision == null) { - if (!Std.is(args[argIndex], Int)) + if (!(args[argIndex] is Int)) throw new PrintfError("invalid 'precision' argument"); tagArgs.precision = args[argIndex++]; } @@ -996,4 +996,4 @@ private enum FloatType FNormal; FScientific; FNatural; -} \ No newline at end of file +}