removing as it doesn't belong in here.
This commit is contained in:
parent
f646aa2228
commit
fc7e07137d
1 changed files with 1 additions and 29 deletions
|
@ -50,35 +50,7 @@ public:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Backward compatiblity for version pre 2.0.0
|
throw config_error( "Failed to parse expression: \"" + str + "\"" );
|
||||||
// To be removed in 2.1.0...
|
|
||||||
if (!boost::algorithm::icontains(str,"'")
|
|
||||||
&& !boost::algorithm::icontains(str,"[")
|
|
||||||
&& !boost::algorithm::icontains(str,"]")
|
|
||||||
&& !boost::algorithm::icontains(str," ")
|
|
||||||
&& !boost::algorithm::icontains(str,"\""))
|
|
||||||
{
|
|
||||||
|
|
||||||
expression_ptr expr1(new expr_node(true));
|
|
||||||
mapnik::expression_grammar<std::string::const_iterator> g1(tr);
|
|
||||||
std::string str1("[" + str + "]");
|
|
||||||
std::string::const_iterator itr1 = str1.begin();
|
|
||||||
std::string::const_iterator end1 = str1.end();
|
|
||||||
bool r1 = boost::spirit::qi::phrase_parse(itr1,end1,g1, boost::spirit::standard_wide::space,*expr1);
|
|
||||||
if (r1 && itr1==end1)
|
|
||||||
{
|
|
||||||
std::clog << "Deprecation Warning: symbolizer value now an expression, please wrap properly in brackets like \"" + str1 + "\"\n";
|
|
||||||
return expr1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw config_error( "Failed to parse expression: \"" + str + "\"" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw config_error( "Failed to parse expression: \"" + str + "\"" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue