From: fred Date: Tue, 26 Mar 2002 23:22:59 +0000 (+0000) Subject: lilypond-1.3.60 X-Git-Tag: release/1.5.59~1580 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ae691e7f1efe2c6ad27732b84f45d75d1b1a5344;p=lilypond.git lilypond-1.3.60 --- diff --git a/flower/dstream.cc b/flower/dstream.cc index 46394bf4d5..5834c3a430 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -7,9 +7,9 @@ */ #include -#include "dictionary-iter.hh" #include "dstream.hh" - +#include "dictionary-iter.hh" +#include "dictionary.hh" #include "text-db.hh" #include "string-convert.hh" #include "rational.hh" @@ -73,6 +73,9 @@ Dstream::identify_as (String name) bool Dstream::silent_b (String s) const { + if (!silent_dict_p_) + return 0; + if (!silent_dict_p_->elem_b (s)) return false; return (*silent_dict_p_)[s]; @@ -201,10 +204,7 @@ Dstream::~Dstream() void Dstream::clear_silence() { - for (map::iterator ki(silent_dict_p_->begin ()); - silent_dict_p_->end () != ki; ki++) - { - (*ki).second = false; - } + delete silent_dict_p_; + silent_dict_p_ = 0; } diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index 22a31ea798..0f1c100796 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -29,6 +29,8 @@ const char eol= '\n'; TODO: make a baseclass for indentable streams. + + JUNKME */ class Dstream { @@ -39,7 +41,7 @@ class Dstream String current_classname_str_; void output (String s); Dictionary *silent_dict_p_; - + public: void clear_silence(); bool silent_b (String) const;