]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.60
authorfred <fred>
Tue, 26 Mar 2002 23:22:59 +0000 (23:22 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:22:59 +0000 (23:22 +0000)
flower/dstream.cc
flower/include/dstream.hh

index 46394bf4d53d581657ab7e221cc5bf189935b88f..5834c3a430e63d0fbc8184ef760cc115882e7574 100644 (file)
@@ -7,9 +7,9 @@
 */
 
 #include <fstream.h>
-#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<String,bool>::iterator ki(silent_dict_p_->begin ());
-       silent_dict_p_->end () != ki; ki++)
-    {
-      (*ki).second = false;
-    }
+  delete silent_dict_p_;
+  silent_dict_p_ = 0;
 }
 
index 22a31ea798813e9a13a886756c61d1ecc1a8cee0..0f1c10079661d1b9df778c10d8c6ae593a135030 100644 (file)
@@ -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<bool> *silent_dict_p_;
-
+  
 public:
   void clear_silence();
   bool silent_b (String) const;