]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/interval-set.cc
Merge remote branch 'origin' into release/unstable
[lilypond.git] / flower / interval-set.cc
index 49ad550bf9d5c42f81ba8f2a5c9a93ffec7bec1c..193be7f7f1605fda8e22d5b6c1cba5a23f5e8ba9 100644 (file)
@@ -1,9 +1,20 @@
 /*
-  interval-set.hh -- implement Interval_set
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "interval-set.hh"
@@ -40,26 +51,26 @@ Interval_set::remove_interval (Interval rm)
       s.intersect (allowed_regions_[i]);
 
       if (!s.is_empty ())
-       {
-         Interval before = allowed_regions_[i];
-         Interval after = allowed_regions_[i];
+        {
+          Interval before = allowed_regions_[i];
+          Interval after = allowed_regions_[i];
 
-         before[RIGHT] = s[LEFT];
-         after[LEFT] = s[RIGHT];
+          before[RIGHT] = s[LEFT];
+          after[LEFT] = s[RIGHT];
 
-         if (!before.is_empty () && before.length () > 0.0)
-           {
-             allowed_regions_.insert (allowed_regions_.begin () + i, before);
-             i++;
-           }
-         allowed_regions_.erase (allowed_regions_.begin () + i);
-         if (!after.is_empty () && after.length () > 0.0)
-           {
-             allowed_regions_.insert (allowed_regions_.begin () + i, after);
-             i++;
-           }
-       }
+          if (!before.is_empty () && before.length () > 0.0)
+            {
+              allowed_regions_.insert (allowed_regions_.begin () + i, before);
+              i++;
+            }
+          allowed_regions_.erase (allowed_regions_.begin () + i);
+          if (!after.is_empty () && after.length () > 0.0)
+            {
+              allowed_regions_.insert (allowed_regions_.begin () + i, after);
+              i++;
+            }
+        }
       else
-       i++;
+        i++;
     }
 }