#include "lib/audio_analysis.h"
#include "lib/compose.hpp"
#include <wx/graphics.h>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include <iostream>
#include <cfloat>
using std::map;
using boost::bind;
using boost::optional;
-using boost::shared_ptr;
-using boost::weak_ptr;
+using std::shared_ptr;
+using std::weak_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using namespace dcpomatic;
int const AudioPlot::_minimum = -70;
DCPOMATIC_ASSERT (_peak.find(channel) != _peak.end());
path.MoveToPoint (_peak[channel][0].draw);
- BOOST_FOREACH (Point const & i, _peak[channel]) {
+ for (auto const& i: _peak[channel]) {
path.AddLineToPoint (i.draw);
}
}
DCPOMATIC_ASSERT (_rms.find(channel) != _rms.end());
path.MoveToPoint (_rms[channel][0].draw);
- BOOST_FOREACH (Point const & i, _rms[channel]) {
+ for (auto const& i: _rms[channel]) {
path.AddLineToPoint (i.draw);
}
}
AudioPlot::search (map<int, PointList> const & search, wxMouseEvent const & ev, double& min_dist, Point& min_point) const
{
for (map<int, PointList>::const_iterator i = search.begin(); i != search.end(); ++i) {
- BOOST_FOREACH (Point const & j, i->second) {
+ for (auto const& j: i->second) {
double const dist = pow(ev.GetX() - j.draw.x, 2) + pow(ev.GetY() - j.draw.y, 2);
if (dist < min_dist) {
min_dist = dist;