From 945ed989c09d03a1b899321c50e0b201dca842c4 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:38:14 +0000 Subject: [PATCH] lilypond-0.0.49 --- flower/dstream.cc | 6 +++--- lib/binary-source-file.cc | 1 - lily/identifier.cc | 9 +++++++-- lily/include/identifier.hh | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/flower/dstream.cc b/flower/dstream.cc index 05ee3e6958..73416a4e46 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -45,9 +45,9 @@ Dstream::identify_as(String name) String cl(strip_member(mem)); String idx = cl; - if (silent->elt_query(mem)) + if (silent->elt_b(mem)) idx = mem; - else if (silent->elt_query(cl)) + else if (silent->elt_b(cl)) idx = cl; else { (*silent)[idx] = false; @@ -64,7 +64,7 @@ Dstream::identify_as(String name) bool Dstream::silence(String s) { - if (!silent->elt_query(s)) + if (!silent->elt_b(s)) return false; return (*silent)[s]; } diff --git a/lib/binary-source-file.cc b/lib/binary-source-file.cc index f080c2dab2..c2e3c152be 100644 --- a/lib/binary-source-file.cc +++ b/lib/binary-source-file.cc @@ -13,7 +13,6 @@ #include "proto.hh" #include "plist.hh" #include "string.hh" -#include "debug.hh" #include "source-file.hh" #include "binary-source-file.hh" #include "string-convert.hh" diff --git a/lily/identifier.cc b/lily/identifier.cc index 8b989f9868..72224f92f9 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -21,6 +21,11 @@ #include "request.hh" #include "input-register.hh" +Identifier::~Identifier() +{ + if (!accessed_b_ && !init_b_) + warning("Variable not used"); +} void Identifier::error(String expect) { @@ -30,7 +35,7 @@ Identifier::error(String expect) } Identifier::Identifier(String n, int code) - : name(n) + : name_str_(n) { token_code_i_ = code; data = 0; @@ -41,7 +46,7 @@ Identifier::Identifier(String n, int code) void Identifier::print()const { - mtor << "identifier \'" << name << "\'="; + mtor << "identifier \'" << name_str_ << "\'="; do_print(); } diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index 9078f7323c..49c7b954db 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -18,13 +18,13 @@ struct Identifier : public Input { void *data; - String name; + String name_str_; bool init_b_; bool accessed_b_; int token_code_i_; Identifier(String n, int code) ; - virtual ~Identifier() {} + virtual ~Identifier() ; void print()const; virtual char const *classname() const{ return "new Identifier"; } -- 2.39.5