diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-26 13:59:14 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-26 13:59:14 -0700 |
commit | f2a437bd3bff39fc40e9fc0868cb22d47cc84614 (patch) | |
tree | 4c43ea5be7814b6c1fa65be9c75e8e8548212d2b /parse_execution.cpp | |
parent | 12025e30503f68ffbd4dac0d318e253c71c97bca (diff) | |
parent | 7a7fb423b306d3de62ef62ff4c8cbded2cdd0f10 (diff) |
Merge branch 'master' into parser_cleanup
Conflicts:
parse_constants.h
parse_tree.h
Diffstat (limited to 'parse_execution.cpp')
-rw-r--r-- | parse_execution.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parse_execution.cpp b/parse_execution.cpp index 6453ba37..649caaa8 100644 --- a/parse_execution.cpp +++ b/parse_execution.cpp @@ -72,7 +72,8 @@ node_offset_t parse_execution_context_t::get_offset(const parse_node_t &node) co const parse_node_t *addr = &node; const parse_node_t *base = &this->tree.at(0); assert(addr >= base); - node_offset_t offset = addr - base; + assert(addr - base < SOURCE_OFFSET_INVALID); + node_offset_t offset = static_cast<node_offset_t>(addr - base); assert(offset < this->tree.size()); assert(&tree.at(offset) == &node); return offset; @@ -1100,7 +1101,7 @@ bool parse_execution_context_t::determine_io_chain(const parse_node_t &statement if (out_chain && ! errored) { - std::swap(*out_chain, result); + out_chain->swap(result); } return ! errored; } |