Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mapnik/mapnik into stats_processor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Jan 25, 2013
2 parents 8665291 + 20718b0 commit 37daca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/cairo_renderer.cpp
Expand Up @@ -36,7 +36,6 @@
#include <mapnik/parse_path.hpp>
#include <mapnik/marker.hpp>
#include <mapnik/marker_cache.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/font_set.hpp>
#include <mapnik/parse_path.hpp>
#include <mapnik/map.hpp>
Expand Down
8 changes: 2 additions & 6 deletions src/expression.cpp
Expand Up @@ -24,12 +24,11 @@
#include <mapnik/expression.hpp>
#include <mapnik/config_error.hpp>
#include <mapnik/unicode.hpp>
#include <mapnik/expression_node.hpp>
#include <mapnik/expression_node_types.hpp>
#include <mapnik/expression_grammar.hpp>
#include <boost/spirit/include/qi.hpp>

// boost
#include <boost/algorithm/string.hpp>
#include <boost/make_shared.hpp>

namespace mapnik
Expand All @@ -39,20 +38,17 @@ expression_ptr parse_expression(std::string const& str, std::string const& encod
{
transcoder tr(encoding);
expression_grammar<std::string::const_iterator> g(tr);

return parse_expression(str, g);
}

expression_ptr parse_expression(std::string const& str,
mapnik::expression_grammar<std::string::const_iterator> const& g)
{
expr_node node;

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);
if (r && itr==end)
if (r && itr == end)
{
return boost::make_shared<expr_node>(node);
}
Expand Down

0 comments on commit 37daca6

Please sign in to comment.