X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finterval-minefield.cc;h=96d7d27704b206ef5b11ad4b58e0337a400478be;hb=0b544cfb7332615ef809b71b57ab656741311ae1;hp=7571e219ece4d062563c826d4be455c5e931cd4c;hpb=bdf74886dc9bcaf01c55677bf2086f4b76a7ef8c;p=lilypond.git diff --git a/lily/interval-minefield.cc b/lily/interval-minefield.cc index 7571e219ec..96d7d27704 100644 --- a/lily/interval-minefield.cc +++ b/lily/interval-minefield.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2011--2012 Mike Solomon + Copyright (C) 2011--2014 Mike Solomon Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify @@ -19,7 +19,7 @@ */ #include "interval-minefield.hh" -#include "grob.hh" + Interval_minefield::Interval_minefield (Interval feasible_placements, Real bulk) { feasible_placements_ = feasible_placements; @@ -58,8 +58,7 @@ Interval_minefield::solve () dirty = false; for (vsize i = 0; i < forbidden_intervals_.size (); i++) { - Direction d = DOWN; - do + for (DOWN_and_UP (d)) { Interval feasible_widened = Interval (feasible_placements_[d], feasible_placements_[d]); feasible_widened.widen (bulk_ / 2.); @@ -75,8 +74,7 @@ Interval_minefield::solve () dirty = true; } } - while (flip (&d) != DOWN); } } while (dirty); -} \ No newline at end of file +}