From e3970f9cbbd00289c551f947db0f4644654bd8d9 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 28 Feb 2016 00:33:11 -0800 Subject: 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. --- src/parse_execution.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parse_execution.h') 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 t, const wcstring &s, parser_t *p, int initial_eval_level); /* Returns the current eval level */ int current_eval_level() const -- cgit v1.2.3