use c++11 features over boost when available
This commit is contained in:
parent
667b6e3adc
commit
a04276d90a
1 changed files with 3 additions and 3 deletions
|
@ -26,12 +26,12 @@
|
||||||
|
|
||||||
// boost
|
// boost
|
||||||
#include <boost/spirit/include/qi.hpp>
|
#include <boost/spirit/include/qi.hpp>
|
||||||
#include <boost/bind.hpp>
|
|
||||||
|
|
||||||
// stl
|
// stl
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
|
@ -56,9 +56,10 @@ void font_feature_settings::from_string(std::string const& features)
|
||||||
qi::as_string_type as_string;
|
qi::as_string_type as_string;
|
||||||
|
|
||||||
// Call correct overload.
|
// Call correct overload.
|
||||||
|
using std::placeholders::_1;
|
||||||
void (font_feature_settings::*append)(std::string const&) = &font_feature_settings::append;
|
void (font_feature_settings::*append)(std::string const&) = &font_feature_settings::append;
|
||||||
|
|
||||||
if (!qi::parse(features.begin(), features.end(), as_string[+(char_ - ',')][boost::bind(append, this, ::_1)] % ','))
|
if (!qi::parse(features.begin(), features.end(), as_string[+(char_ - ',')][std::bind(append, this, _1)] % ','))
|
||||||
{
|
{
|
||||||
throw config_error("failed to parse font-feature-settings: '" + features + "'");
|
throw config_error("failed to parse font-feature-settings: '" + features + "'");
|
||||||
}
|
}
|
||||||
|
@ -98,4 +99,3 @@ void font_feature_settings::append(std::string const& feature)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue