summaryrefslogtreecommitdiff
path: root/lily/paper-column.cc
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2000-05-22 13:12:04 +0200
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2000-05-22 13:12:04 +0200
commitd7416352b825c3e9b4858e1ddcf14f0c00e26d89 (patch)
tree3db061adae3fcdc2ab5f2f0646dd9f07d68190a4 /lily/paper-column.cc
parent0d73d1699ab89227662d21c792354bf338c230f1 (diff)
release: 1.3.53
====== * Small cleanups in Molecule interface * Spacing related elements perform suicide after calculating distances. This saves a some memory, approximately 2 to 5 % ? * Small cleanups in line breaking: Paper_column stores springs and rods in only one place now. All fields relating to energy have been removed * Don't generate all output Scheme in memory, but evaluate to output file immediately. This will reduce memory usage a little. * Use STL's map for Dictionary template * Substitute pointers on element properties of the root Line_of_score as well. * Added toplevel doc target, to support building doc with --srcdir * Removed cygwin build stuff; updated versions at: http://appel.dyndns.org/lilypond/gnu-windows/cross * Fixed lily.scm to handle incipits (thanks, Mats) 1.3
Diffstat (limited to 'lily/paper-column.cc')
-rw-r--r--lily/paper-column.cc43
1 files changed, 11 insertions, 32 deletions
diff --git a/lily/paper-column.cc b/lily/paper-column.cc
index 2f225d0718..d81fc89911 100644
--- a/lily/paper-column.cc
+++ b/lily/paper-column.cc
@@ -16,15 +16,15 @@ Paper_column::add_rod (Paper_column * p, Real d)
{
Direction dir = Direction (sign (p->rank_i () - rank_i ()));
- if (!dir)
+ if (dir != RIGHT)
{
- programming_error ("Must set minimum distance between differing columns.");
+ programming_error ("Must set minimum distance LTOR.");
return;
}
- for (int i=0; i < minimal_dists_arr_drul_[dir].size (); i++)
+ for (int i=0; i < minimal_dists_.size (); i++)
{
- Column_rod &rod = minimal_dists_arr_drul_[dir][i];
+ Column_rod &rod = minimal_dists_[i];
if (rod.other_l_ == p)
{
rod.distance_f_ = rod.distance_f_ >? d;
@@ -36,7 +36,7 @@ Paper_column::add_rod (Paper_column * p, Real d)
cr.distance_f_ = d;
cr.other_l_ = p;
- minimal_dists_arr_drul_[dir].push (cr);
+ minimal_dists_.push (cr);
}
void
@@ -44,15 +44,15 @@ Paper_column::add_spring (Paper_column * p, Real d, Real s)
{
Direction dir = Direction (sign (p->rank_i () - rank_i ()));
- if (!dir)
+ if (dir != RIGHT)
{
- warning (_ ("Must set spring between differing columns"));
+ programming_error ("Must set springs LTOR");
return;
}
- for (int i=0; i < spring_arr_drul_[dir].size (); i++)
+ for (int i=0; i < springs_.size (); i++)
{
- Column_spring &spring = spring_arr_drul_[dir][i];
+ Column_spring &spring = springs_[i];
if (spring.other_l_ == p)
{
spring.distance_f_ = spring.distance_f_ >? d;
@@ -65,7 +65,7 @@ Paper_column::add_spring (Paper_column * p, Real d, Real s)
cr.strength_f_ = s;
cr.other_l_ = p;
- spring_arr_drul_[dir].push (cr);
+ springs_.push (cr);
}
int
@@ -80,28 +80,7 @@ Paper_column::set_rank (int i)
rank_i_ = i;
}
-void
-Paper_column::do_print() const
-{
-#ifndef NPRINT
- DEBUG_OUT << "rank: " << rank_i_ << '\n';
- Direction d = LEFT;
- do
- {
- for (int i=0; i < minimal_dists_arr_drul_[d].size (); i++)
- {
- minimal_dists_arr_drul_[d][i].print ();
- }
- for (int i=0; i < spring_arr_drul_[d].size (); i++)
- {
- spring_arr_drul_[d][i].print ();
- }
-
- }
- while ((flip (&d))!=LEFT);
- Item::do_print ();
-#endif
-}
+
Line_of_score*
Paper_column::line_l() const