]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.16
authorfred <fred>
Sun, 24 Mar 2002 19:58:23 +0000 (19:58 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:58:23 +0000 (19:58 +0000)
flower/include/string.hh
flower/string.cc
lily/chord-iterator.cc
lily/clef-grav.cc
lily/dimen.cc

index b749b7ee06a9ff75910593abd53d09d803e5bc9b..9e60bf9858ee02be020b9978f62d171cdc54cfe3 100644 (file)
@@ -83,21 +83,27 @@ public:
   Byte const* byte_C() const;
   char* ch_l();
   Byte* byte_l();
-
+#if 0
   /// deprecated; use ch_C()
   operator char const*() const { return ch_C(); }
-    
+#endif
   String &operator =(String const & source);
 
   /// concatenate s
   void operator += (char const* s) { strh_ += s; }
   void operator += (String s);
 
-  /// is the string empty?
-  operator bool () const
+  bool empty_b () const;
+#if 0
+  /** is the string empty?
+
+    Ugh-ugh-thank-you-cygnus.  W32 barfs on this
+   */
+  operator bool () const;
   {
     return length_i (); 
   }
+#endif
   void append (String);
   void prepend (String);
 
index a68afb58873a40744592b9ca6d1f44565351fe28..74ae9a7865b3e8c553422acdb5078f24c0e8f94c 100644 (file)
@@ -139,6 +139,11 @@ String::ch_l()
   return strh_.ch_l();
 }
 
+bool 
+String::empty_b () const
+{
+  return !length_i ();
+}
 /**
   Do a signed comparison,  analogous to memcmp;
  */
@@ -214,7 +219,7 @@ String::index_i (char c) const
   find the substring.
 
   @return
-  index of leftmost occurrence of #searchfor#
+1  index of leftmost occurrence of #searchfor#
  */
 int
 String::index_i (String searchfor) const
index 83c5435ed6aa043031c25407e532ec273caa5bc7..054990199fff85b35569a7294a439b0a2d9f7bd6 100644 (file)
@@ -32,7 +32,7 @@ Chord_iterator::construct_children()
       Music_iterator * mi = get_iterator_p (i.ptr());
       if (mi->ok()) 
        {
-         if  (!chord_C_->translator_type_str_)
+         if  (chord_C_->translator_type_str_.empty_b ())
            set_translator (mi->report_to_l()->ancestor_l (chord_C_->multi_level_i_));
          children_p_list_.bottom().add (mi);
        }
index 5571327077b044327266ec917131e3020cf01c1b..670e5d9cd0520bb130d57907cfeb408d10bcf1cc 100644 (file)
@@ -63,7 +63,7 @@ Clef_engraver::read_req (Clef_change_req*c_l)
 void
 Clef_engraver::acknowledge_element (Score_elem_info info)
 {
-  if (info.elem_l_->name() == Bar::static_name () && clef_type_str_) 
+  if (info.elem_l_->name() == Bar::static_name () && clef_type_str_.length_i()
     {
       create_clef();
       if (!clef_req_l_)
@@ -77,7 +77,7 @@ Clef_engraver::do_creation_processing()
   Scalar def = get_property ("defaultclef");
   if (def)
     set_type (def);
-  if (clef_type_str_)
+  if (clef_type_str_.length_i ())
     create_clef();
   clef_p_->default_b_ = false;
 }
index 499d286cf2ae5f61b8a4e196597587c1f9fc40db..466522169294ae174541756d764005d7c9187209 100644 (file)
@@ -7,7 +7,7 @@ Real
 parse_dimen (String dim)
 {
   int i=dim.length_i()-1;
-  char const *s = dim;
+  char const *s = dim.ch_C ();
   while  (i > 0 && (isspace (s[i]) || isalpha (s[i])))
     {
       i--;