From 2564c004200a13efc84bdda59d1838ea9300d11e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 13 Nov 2013 18:44:58 -0800 Subject: [PATCH] expression parser - avoid extra level of indirection --- src/expression.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/expression.cpp b/src/expression.cpp index 44629de63..42e2fd022 100644 --- a/src/expression.cpp +++ b/src/expression.cpp @@ -44,13 +44,13 @@ expression_ptr parse_expression(std::string const& str, std::string const& encod expression_ptr parse_expression(std::string const& str, mapnik::expression_grammar const& g) { - expr_node node; + expression_ptr node = boost::make_shared(); std::string::const_iterator itr = str.begin(); std::string::const_iterator end = str.end(); - bool r = boost::spirit::qi::phrase_parse(itr, end, g, boost::spirit::standard_wide::space, node); + bool r = boost::spirit::qi::phrase_parse(itr, end, g, boost::spirit::standard_wide::space, *node); if (r && itr == end) { - return boost::make_shared(node); + return node; } else {