Convert almost all IdleRegister::add() calls to add(std::function<>)

This commit is contained in:
Flössie
2019-01-01 15:53:39 +01:00
parent 5af3f64a9d
commit b08fb04dae
22 changed files with 574 additions and 610 deletions

View File

@@ -1518,28 +1518,27 @@ void MyDiagonalCurve::updateBackgroundHistogram (LUTu & hist)
mcih->pending++;
const auto func =
[](MyCurveIdleHelper* mcih) -> bool
idle_register.add(
[this]() -> bool
{
if (mcih->destroyed) {
if (mcih->pending == 1) {
delete mcih;
} else {
mcih->pending--;
--mcih->pending;
}
return false;
}
mcih->clearPixmap ();
mcih->myCurve->queue_draw ();
mcih->clearPixmap();
mcih->myCurve->queue_draw();
mcih->pending--;
--mcih->pending;
return false;
};
idle_register.add<MyCurveIdleHelper>(func, mcih, false);
}
);
}
void MyDiagonalCurve::reset(const std::vector<double> &resetCurve, double identityValue)