mirror of
https://github.com/boostorg/gil.git
synced 2026-02-26 16:52:10 +00:00
Remove uses of Boost.Bind and Boost.Lambda (#212)
Replace with std::bind and C++11 lambda functions. The two Boost libraries should no longer be a direct dependency of Boost.GIL.
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/crc.hpp>
|
||||
#include <boost/lambda/bind.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
|
||||
#include <ios>
|
||||
@@ -50,10 +48,15 @@ void error_if(bool condition);
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
template <typename GrayView, typename R>
|
||||
void gray_image_hist(const GrayView& img_view, R& hist) {
|
||||
// for_each_pixel(img_view,++lambda::var(hist)[lambda::_1]);
|
||||
for (typename GrayView::iterator it=img_view.begin(); it!=img_view.end(); ++it)
|
||||
void gray_image_hist(GrayView const& img_view, R& hist)
|
||||
{
|
||||
for (auto it = img_view.begin(); it != img_view.end(); ++it)
|
||||
++hist[*it];
|
||||
|
||||
// Alternatively, prefer the algorithm with lambda
|
||||
// for_each_pixel(img_view, [&hist](gray8_pixel_t const& pixel) {
|
||||
// ++hist[pixel];
|
||||
// });
|
||||
}
|
||||
|
||||
template <typename V, typename R>
|
||||
|
||||
Reference in New Issue
Block a user