Skip to content

Commit

Permalink
satisfy compiler's concern about mixed signed/unsigned comparison (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars-risc0 authored Aug 27, 2024
1 parent 004f942 commit 22eb426
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zirgen/dsl/passes/GenerateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ class AllocationTable {
int nextIndex(int n) {
int next = storage.find_next_unset(n);
size_t capacity = storage.getBitCapacity();
if (next == -1 || next >= capacity) {
assert(next >= -1);
if (next == -1 || (size_t)next >= capacity) {
storage.resize(2 * capacity);

AllocationTable* ancestor = parent;
Expand Down

0 comments on commit 22eb426

Please sign in to comment.