rely on implicit std::reference_wrapper<T> -> T conversions (thanks @lightmare)
This commit is contained in:
parent
93d0eea8af
commit
5eca7731e9
3 changed files with 1 additions and 29 deletions
|
@ -73,11 +73,7 @@ namespace mapnik { namespace grammar {
|
|||
template <typename Context>
|
||||
inline mapnik::transcoder const& extract_transcoder(Context const& ctx)
|
||||
{
|
||||
#if BOOST_VERSION >= 106700
|
||||
return x3::get<transcoder_tag>(ctx);
|
||||
#else
|
||||
return x3::get<transcoder_tag>(ctx).get();
|
||||
#endif
|
||||
}
|
||||
|
||||
auto append = [](auto const& ctx)
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
namespace mapnik { namespace svg { namespace grammar {
|
||||
|
||||
|
||||
namespace x3 = boost::spirit::x3;
|
||||
|
||||
using x3::lit;
|
||||
|
@ -44,8 +43,6 @@ using x3::no_case;
|
|||
|
||||
using coord_type = std::tuple<double,double>;
|
||||
|
||||
#if BOOST_VERSION >= 106700
|
||||
|
||||
template <typename Context>
|
||||
svg_converter_type & extract_path(Context const& ctx)
|
||||
{
|
||||
|
@ -58,19 +55,6 @@ bool & extract_relative(Context const& ctx)
|
|||
return x3::get<relative_tag>(ctx);
|
||||
}
|
||||
|
||||
#else
|
||||
template <typename Context>
|
||||
svg_converter_type & extract_path(Context const& ctx)
|
||||
{
|
||||
return x3::get<svg_path_tag>(ctx).get();
|
||||
}
|
||||
template <typename Context>
|
||||
bool & extract_relative(Context const& ctx)
|
||||
{
|
||||
return x3::get<relative_tag>(ctx).get();
|
||||
}
|
||||
#endif
|
||||
|
||||
auto const move_to = [] (auto const& ctx)
|
||||
{
|
||||
extract_path(ctx).move_to(std::get<0>(_attr(ctx)), std::get<1>(_attr(ctx)), x3::get<relative_tag>(ctx));
|
||||
|
|
|
@ -44,19 +44,11 @@ using x3::lit;
|
|||
using x3::double_;
|
||||
using x3::no_case;
|
||||
|
||||
#if BOOST_VERSION >= 106700
|
||||
template <typename Context>
|
||||
auto & extract_transform(Context const& ctx)
|
||||
agg::trans_affine & extract_transform(Context const& ctx)
|
||||
{
|
||||
return x3::get<svg_transform_tag>(ctx);
|
||||
}
|
||||
#else
|
||||
template <typename Context>
|
||||
auto & extract_transform(Context const& ctx)
|
||||
{
|
||||
return x3::get<svg_transform_tag>(ctx).get();
|
||||
}
|
||||
#endif
|
||||
|
||||
auto const matrix_action = [] (auto const& ctx)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue