diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-12-20 17:41:21 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-12-20 17:41:21 -0800 |
commit | e38217683c65f53fcaa3b6a5daedb6b23b408a90 (patch) | |
tree | 18e4abbea0cb72e30d12aab5569c70ceb77f4406 /event.cpp | |
parent | 12be83562d9096538848a554c4d9f0e0f30f760f (diff) |
Refactor block_t storage in parser_t from a linked list to a vector
Diffstat (limited to 'event.cpp')
-rw-r--r-- | event.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -144,12 +144,15 @@ static int event_match(const event_t &classv, const event_t &instance) */ static int event_is_blocked(const event_t &e) { - block_t *block; + const block_t *block; parser_t &parser = parser_t::principal_parser(); - for (block = parser.current_block; block; block = block->outer) + + size_t idx = 0; + while ((block = parser.block_at_index(idx++))) { if (event_block_list_blocks_type(block->event_blocks, e.type)) return true; + } return event_block_list_blocks_type(parser.global_event_blocks, e.type); } |