+2006-01-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/slur-scoring.cc (get_best_curve): handle opt_idx < 0 case.
+
2006-01-27 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/main.cc (main): Debugging aid: catch exceptions.
}
#if DEBUG_SLUR_SCORING
- configurations_[opt_idx]->score_card_ += to_string ("=%.2f", opt);
- configurations_[opt_idx]->score_card_ += to_string ("i%d", opt_idx);
-
+ if (opt_idx >= 0)
+ {
+ configurations_[opt_idx]->score_card_ += to_string ("=%.2f", opt);
+ configurations_[opt_idx]->score_card_ += to_string ("i%d", opt_idx);
+ }
+ else
+ {
+ programming_error ("No optimal slur found. Guessing 0.");
+ opt_idx = 0;
+ }
+
// debug quanting
slur_->set_property ("quant-score",
scm_makfrom0str (configurations_[opt_idx]->score_card_.c_str ()));