Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace boost::bind with std::bind #68

Merged
merged 1 commit into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/detection/FootprintMerge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* the GNU General Public License along with this program. If not,
* see <http://www.lsstcorp.org/LegalNotices/>.
*/
#include "boost/bind.hpp"

#include "lsst/afw/detection/FootprintMerge.h"
#include "lsst/afw/detection/FootprintSet.h"
#include "lsst/afw/table/IdFactory.h"
Expand Down
1 change: 0 additions & 1 deletion src/image/Image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#pragma clang diagnostic ignored "-Wunused-variable"
#include "boost/lambda/lambda.hpp"
#pragma clang diagnostic pop
#include "boost/bind/bind.hpp"
#include "boost/format.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/gil/gil_all.hpp"
Expand Down
20 changes: 11 additions & 9 deletions src/image/Mask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@

#include "boost/functional/hash.hpp"

#include "boost/bind.hpp"

#include "lsst/daf/base.h"
#include "lsst/daf/base/Citizen.h"
#include "lsst/pex/exceptions.h"
Expand Down Expand Up @@ -335,18 +333,21 @@ MaskDict::getUnusedPlane() const
}

MapWithHash::const_iterator const it =
std::max_element(begin(), end(), boost::bind(std::less<int>(),
boost::bind(&MapWithHash::value_type::second, _1),
boost::bind(&MapWithHash::value_type::second, _2)
std::max_element(begin(), end(), std::bind(std::less<int>(),
std::bind(&MapWithHash::value_type::second,
std::placeholders::_1),
std::bind(&MapWithHash::value_type::second,
std::placeholders::_2)
)
);
assert(it != end());
int id = it->second + 1; // The maskPlane to use if there are no gaps

for (int i = 0; i < id; ++i) {
MapWithHash::const_iterator const it = // is i already used in this Mask?
std::find_if(begin(), end(), boost::bind(std::equal_to<int>(),
boost::bind(&MapWithHash::value_type::second, _1), i));
std::find_if(begin(), end(), std::bind(std::equal_to<int>(),
std::bind(&MapWithHash::value_type::second,
std::placeholders::_1), i));
if (it == end()) { // Not used; so we'll use it
return i;
}
Expand Down Expand Up @@ -664,8 +665,9 @@ namespace {
void operator()(MapWithHash *dict) {
detail::MaskPlaneDict::const_iterator const it = // is id already used in this Mask?
std::find_if(dict->begin(), dict->end(),
boost::bind(std::equal_to<int>(),
boost::bind(&detail::MaskPlaneDict::value_type::second, _1), _id));
std::bind(std::equal_to<int>(),
std::bind(&detail::MaskPlaneDict::value_type::second,
std::placeholders::_1), _id));
if (it != dict->end()) { // mask plane is already in use
return;
}
Expand Down