diff options
author | Alon Zakai <azakai@google.com> | 2020-11-12 11:34:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 11:34:46 -0800 |
commit | 8d29ce697d069906c16d8366a8ec65df0c4c2257 (patch) | |
tree | 41e6b1f3a009463019d6904bb1728fdab8e3df93 /src/wasm-delegations-fields.h | |
parent | 20422e2e6d64d79dffd110781f680f98bdb16405 (diff) | |
download | binaryen-8d29ce697d069906c16d8366a8ec65df0c4c2257.tar.gz binaryen-8d29ce697d069906c16d8366a8ec65df0c4c2257.tar.bz2 binaryen-8d29ce697d069906c16d8366a8ec65df0c4c2257.zip |
Remove boilerplate in walking logic (#3344)
Also fix the order of walking children, which was wrong in the macro. What's nice
is that fixing it there would fix anything else using the macro automatically
(however, so far nothing else was affected by it).
Diffstat (limited to 'src/wasm-delegations-fields.h')
-rw-r--r-- | src/wasm-delegations-fields.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-delegations-fields.h b/src/wasm-delegations-fields.h index df2309474..ddcd2792b 100644 --- a/src/wasm-delegations-fields.h +++ b/src/wasm-delegations-fields.h @@ -93,7 +93,7 @@ #ifndef DELEGATE_FIELD_CHILD_VECTOR #ifdef DELEGATE_GET_FIELD #define DELEGATE_FIELD_CHILD_VECTOR(id, name) \ - for (Index i = 0; i < (DELEGATE_GET_FIELD(id, name)).size(); i++) { \ + for (int i = int((DELEGATE_GET_FIELD(id, name)).size()) - 1; i >= 0; i--) { \ DELEGATE_FIELD_CHILD(id, name[i]); \ } #else |