2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-20 02:42:11 +00:00

remove std::bind2nd

This commit is contained in:
Mikhail Gorbushin
2018-08-17 14:21:05 +03:00
committed by Stefan Seefeld
parent 56c2389500
commit eebe183375
2 changed files with 8 additions and 10 deletions

View File

@@ -78,9 +78,10 @@ struct pixel_multiplies_scalar_t {
const Scalar& s) const {
PixelR result;
static_transform(p,result,
std::bind2nd(channel_multiplies_scalar_t<typename channel_type<PixelRef>::type,
Scalar,
typename channel_type<PixelR>::type>(),s));
std::bind(channel_multiplies_scalar_t<typename channel_type<PixelRef>::type,
Scalar,
typename channel_type<PixelR>::type>(),
std::placeholders::_1, s));
return result;
}
};
@@ -112,9 +113,10 @@ struct pixel_divides_scalar_t {
const Scalar& s) const {
PixelR result;
static_transform(p,result,
std::bind2nd(channel_divides_scalar_t<typename channel_type<PixelRef>::type,
Scalar,
typename channel_type<PixelR>::type>(),s));
std::bind(channel_divides_scalar_t<typename channel_type<PixelRef>::type,
Scalar,
typename channel_type<PixelR>::type>(),
std::placeholders::_1, s));
return result;
}
};

View File

@@ -114,11 +114,7 @@ private:
void increment() { static_transform(*this,*this,detail::inc<ChannelPtr>()); }
void decrement() { static_transform(*this,*this,detail::dec<ChannelPtr>()); }
#ifdef BOOST_NO_CXX98_BINDERS
void advance(std::ptrdiff_t d){ static_transform(*this,*this,std::bind(detail::plus_asymmetric<ChannelPtr,std::ptrdiff_t>(),std::placeholders::_1,d)); }
#else
void advance(std::ptrdiff_t d){ static_transform(*this,*this,std::bind2nd(detail::plus_asymmetric<ChannelPtr,std::ptrdiff_t>(),d)); }
#endif
reference dereference() const { return this->template deref<reference>(); }
std::ptrdiff_t distance_to(const planar_pixel_iterator& it) const { return gil::at_c<0>(it)-gil::at_c<0>(*this); }