avoid copying of non-copyable transcoder class - fixes compile with llvm-gcc

This commit is contained in:
Dane Springmeyer 2013-03-19 14:09:01 -07:00
parent fd186d1b79
commit a7ef5c7f60

View file

@ -392,13 +392,15 @@ struct test8
bool validate() bool validate()
{ {
mapnik::expression_grammar<std::string::const_iterator> expr_grammar(transcoder("utf-8")); transcoder tr("utf-8");
mapnik::expression_ptr expr = mapnik::parse_expression(expr_,expr_grammar); mapnik::expression_grammar<std::string::const_iterator> expr_grammar(tr);
return mapnik::to_expression_string(*expr) == expr_; mapnik::expression_ptr expr = mapnik::parse_expression(expr_,expr_grammar);
return mapnik::to_expression_string(*expr) == expr_;
} }
void operator()() void operator()()
{ {
mapnik::expression_grammar<std::string::const_iterator> expr_grammar(transcoder("utf-8")); transcoder tr("utf-8");
mapnik::expression_grammar<std::string::const_iterator> expr_grammar(tr);
for (unsigned i=0;i<iter_;++i) { for (unsigned i=0;i<iter_;++i) {
mapnik::expression_ptr expr = mapnik::parse_expression(expr_,expr_grammar); mapnik::expression_ptr expr = mapnik::parse_expression(expr_,expr_grammar);
} }