summaryrefslogtreecommitdiff
path: root/src/main/java/com/seaofnodes/simple/IterPeeps.java
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2025-04-24 14:38:36 -0700
committerCliff Click <cliffc@acm.org>2025-04-24 14:38:36 -0700
commitcadc530688041b5455e6251055754df6f4182aec (patch)
tree1f83d6d9285adb0c10c9147da3e64700e8ea2820 /src/main/java/com/seaofnodes/simple/IterPeeps.java
parentf6c0b12e6cc1af4879042c0426fc96532cdfddc3 (diff)
downloadSimple-linear-chapter21.tar.gz
Simple-linear-chapter21.zip
Chapter 21: Instruction Encoding and ELFlinear-chapter21
Co-authored-by: Co-authored-by: Cliff Click <cliffc@acm.org> Co-authored-by: Co-authored-by: godalming123 <68993177+godalming123@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com/seaofnodes/simple/IterPeeps.java')
-rw-r--r--src/main/java/com/seaofnodes/simple/IterPeeps.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/seaofnodes/simple/IterPeeps.java b/src/main/java/com/seaofnodes/simple/IterPeeps.java
index 6208209f..66e8a4a8 100644
--- a/src/main/java/com/seaofnodes/simple/IterPeeps.java
+++ b/src/main/java/com/seaofnodes/simple/IterPeeps.java
@@ -49,6 +49,7 @@ public class IterPeeps {
public IterPeeps( long seed ) { _work = new WorkList<>(seed); }
+ @SuppressWarnings("unchecked")
public <N extends Node> N add( N n ) { return (N)_work.push(n); }
public void addAll( Ary<Node> ary ) { _work.addAll(ary); }
@@ -126,6 +127,7 @@ public class IterPeeps {
* Classic WorkList, with a fast add/remove, dup removal, random pull.
* The Node's nid is used to check membership in the worklist.
*/
+ @SuppressWarnings("unchecked")
public static class WorkList<E extends Node> {
private Node[] _es;