From 38265473cb5de6604906f310bc75b60b0807f0e2 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:49:14 +0000 Subject: [PATCH] lilypond-1.1.40 --- NEWS | 19 ++++++++++++++++++- flower/include/array.hh | 4 ++++ flower/include/parray.hh | 21 +++++++++++++++++++++ lily/rhythmic-grouping.cc | 3 +-- lily/score.cc | 3 +-- lily/scores.cc | 7 ++----- 6 files changed, 47 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 1306606e52..5f04e3e2de 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,21 @@ -pl 39 +pl 39.mb2 + - added more mensural style time signatures, old3/4, old6/8, old9/8 + - redesigned old6/4, old9/4 + - Updated refman.yo, lilypond-regtest.doc, clefs.ly, time.fly + +pl 39.hwn1 + - consified mi2mu (pl 37.jcn1) + +pl 39.mb1 + - bf: invisible clefs don't take any space, moved _8 below clef + - updated incipit example and macro + +pl 39.uu1 + - delete graphical objects in reverse + - faq updates. + +******** +pl 39 (april 12) - \property textstyle -> textStyle pl 38.tca1 diff --git a/flower/include/array.hh b/flower/include/array.hh index f8194c2789..10f38ec0bf 100644 --- a/flower/include/array.hh +++ b/flower/include/array.hh @@ -111,6 +111,10 @@ public: return Tarray; } + T const *access_array () const + { + return array_p_; + } void operator=(Array const & src) { set_size (src.size_); diff --git a/flower/include/parray.hh b/flower/include/parray.hh index ee529a5316..94d2e319e3 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -36,6 +36,12 @@ class Link_array : private Array public: Link_array() {} + + Link_array(T * const *tp, int n) + : Array ((void **)tp, n) + { + } + Link_array (Link_array const &src) : Array (src) { @@ -123,6 +129,10 @@ public: Array::empty; Array::reverse; Array::tighten_maxsize; + T ** access_array () const + { + return (T**) Array::access_array(); + } T * get (int i) { return (T*) Array::get (i); @@ -186,5 +196,16 @@ Link_array::sort (int (*compare)(T *const&,T *const&), sort (compare, last+1, upper); } +template +void +junk_pointer_array (Link_array &a) +{ + for (int i=0; i < a.size (); i++) + { + delete a[i]; + } + a.clear (); +} + #endif // PARRAY_HH diff --git a/lily/rhythmic-grouping.cc b/lily/rhythmic-grouping.cc index 0a95845f63..487d03a5b9 100644 --- a/lily/rhythmic-grouping.cc +++ b/lily/rhythmic-grouping.cc @@ -229,8 +229,7 @@ void Rhythmic_grouping::junk() { delete interval_; - for (int i=0; i < children.size(); i++) - delete children[i]; + junk_pointer_array (children); init(); } diff --git a/lily/score.cc b/lily/score.cc index 7c4fbd5a84..7f0016f2b9 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -42,8 +42,7 @@ Score::Score (Score const &s) Score::~Score() { delete header_p_; - for (int i=0; i < def_p_arr_.size (); i++) - delete def_p_arr_[i]; + junk_pointer_array (def_p_arr_); delete music_p_; } diff --git a/lily/scores.cc b/lily/scores.cc index 5991ae6839..5d97d4fef5 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -92,11 +92,8 @@ do_scores() void clear_scores () { - for (int i=0; i < score_global_array.size(); i++) - { - delete score_global_array[i]; - } - score_global_array.clear(); + junk_pointer_array (score_global_array); + inclusion_global_array.clear (); delete header_global_p ; header_global_p =0; -- 2.39.2