summaryrefslogtreecommitdiff
path: root/lily/break.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lily/break.cc')
-rw-r--r--lily/break.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/lily/break.cc b/lily/break.cc
index 8edb91a8b6..2fb1935dfe 100644
--- a/lily/break.cc
+++ b/lily/break.cc
@@ -17,16 +17,16 @@
String
Col_stats::str() const {
- String s(count_i_);
+ String s (count_i_);
s += " lines";
if (count_i_)
- s += String(Real(cols_i_)/count_i_, ", (with an average of %.1f columns)");
+ s += String (Real (cols_i_)/count_i_, ", (with an average of %.1f columns)");
return s;
}
void
-Col_stats::add(Line_of_cols const& line)
+Col_stats::add (Line_of_cols const& line)
{
count_i_++;
cols_i_ += line.size();
@@ -45,10 +45,10 @@ Line_of_cols
Break_algorithm::all_cols()const
{
Line_of_cols retval;
- for (PCursor<PCol*> c(pscore_l_->col_p_list_.top());
+ for (PCursor<PCol*> c (pscore_l_->col_p_list_.top());
c.ok(); c++) {
- retval.push(c);
+ retval.push (c);
}
return retval;
}
@@ -56,16 +56,16 @@ Break_algorithm::all_cols()const
Array<int>
Break_algorithm::find_break_indices() const
{
- Line_of_cols all(all_cols());
+ Line_of_cols all (all_cols());
Array<int> retval;
for (int i=0; i < all.size(); i++)
if (all[i]->breakable_b())
- retval.push(i);
+ retval.push (i);
if ( linelength <=0)
while ( retval.size() >2)
- retval.del(1);
+ retval.del (1);
return retval;
}
@@ -74,17 +74,17 @@ Break_algorithm::find_break_indices() const
Line_of_cols
Break_algorithm::find_breaks() const
{
- Line_of_cols all(all_cols());
+ Line_of_cols all (all_cols());
Line_of_cols retval;
for (int i=0; i < all.size(); i++)
if (all[i]->breakable_b())
- retval.push(all[i]);
+ retval.push (all[i]);
if ( linelength <=0)
while ( retval.size() >2)
- retval.del(1);
+ retval.del (1);
return retval;
}
@@ -94,19 +94,19 @@ Break_algorithm::find_breaks() const
Line_spacer*
-Break_algorithm::generate_spacing_problem(Line_of_cols curline)const
+Break_algorithm::generate_spacing_problem (Line_of_cols curline)const
{
Line_spacer * sp= (*get_line_spacer)();
sp->paper_l_ = pscore_l_->paper_l_;
- sp->add_column(curline[0], true, 0.0);
+ sp->add_column (curline[0], true, 0.0);
for (int i=1; i< curline.size()-1; i++)
- sp->add_column(curline[i]);
+ sp->add_column (curline[i]);
if ( linelength > 0)
- sp->add_column(curline.top(), true, linelength);
+ sp->add_column (curline.top(), true, linelength);
else
- sp->add_column(curline.top());
+ sp->add_column (curline.top());
sp->prepare();
return sp;
@@ -120,7 +120,7 @@ Break_algorithm::Break_algorithm()
}
void
-Break_algorithm::set_pscore(Paper_score*s)
+Break_algorithm::set_pscore (Paper_score*s)
{
pscore_l_ = s;
linelength = s->paper_l_->linewidth_f();
@@ -128,14 +128,14 @@ Break_algorithm::set_pscore(Paper_score*s)
}
bool
-Break_algorithm::feasible(Line_of_cols curline) const
+Break_algorithm::feasible (Line_of_cols curline) const
{
if (linelength <= 0)
return true;
Real l =0;
for (int i=0; i < curline.size(); i++)
- l +=curline[i]->width().length();
+ l +=curline[i]->width().length ();
return l < linelength;
}
@@ -143,7 +143,7 @@ void
Break_algorithm::problem_OK() const
{
if (!pscore_l_->col_p_list_.size())
- error("Score does not have any columns");
+ error ("Score does not have any columns");
OK();
}
@@ -151,11 +151,11 @@ void
Break_algorithm::OK()const
{
#ifndef NDEBUG
- iter_top(pscore_l_->col_p_list_,start);
+ iter_top (pscore_l_->col_p_list_,start);
PCursor<PCol *> end (pscore_l_->col_p_list_.bottom());
- assert(start->breakable_b());
- assert(end->breakable_b());
+ assert (start->breakable_b());
+ assert (end->breakable_b());
#endif
}