aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse_execution.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-28 00:33:11 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-28 00:33:11 -0800
commite3970f9cbbd00289c551f947db0f4644654bd8d9 (patch)
tree6369fb3b8ab4b6f468b20c168030a76a4eba7db5 /src/parse_execution.h
parent077757a30b0ccd930b28cf3ed52d6c7a938156be (diff)
Allow parse_execution_context to take ownership of a parse tree
Introduces a new template moved_ref which is like an rvalue reference. This allows passing around objects while being explicit that the receiver may acquire ownership. This will help reduce some allocations.
Diffstat (limited to 'src/parse_execution.h')
-rw-r--r--src/parse_execution.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse_execution.h b/src/parse_execution.h
index a9ce32f5..ef796676 100644
--- a/src/parse_execution.h
+++ b/src/parse_execution.h
@@ -121,7 +121,7 @@ private:
int line_offset_of_character_at_offset(size_t char_idx);
public:
- parse_execution_context_t(const parse_node_tree_t &t, const wcstring &s, parser_t *p, int initial_eval_level);
+ parse_execution_context_t(moved_ref<parse_node_tree_t> t, const wcstring &s, parser_t *p, int initial_eval_level);
/* Returns the current eval level */
int current_eval_level() const