From c92f68ba36cc4d8b43cb7aefdaaf73c09d069f96 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:29:14 +0000 Subject: [PATCH] lilypond-1.1.5 --- flower/include/dictionary.hh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/flower/include/dictionary.hh b/flower/include/dictionary.hh index e1e840b8a1..e9caa46d64 100644 --- a/flower/include/dictionary.hh +++ b/flower/include/dictionary.hh @@ -173,6 +173,17 @@ public: fixed_p_->dict_arr_[l].name_ = s; return fixed_p_->dict_arr_[l].value_; } + V elem (String s) const + { + return const_elem (s); + } + V const_elem (String k) const + { + V retval; + if (elem_b (k)) + retval = ((Dictionary*)this)->elem (k); + return retval; + } V& operator [] (String k) { return elem (k); @@ -180,10 +191,7 @@ public: V operator [] (String k) const { - V retval; - if (!elem_b (k)) - return retval ; - return ((Dictionary *) this)->elem (k); + return const_elem (k); } V remove (String s) -- 2.39.5