]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/atom.cc
release: 1.1.18
[lilypond.git] / lily / atom.cc
index 3f79970b7154d1ad8f369db4c40ec088a7e7cfd8..efe4bf30f137244cff9f06caf3c07d1355325d46 100644 (file)
@@ -6,7 +6,6 @@
   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-
 #include "atom.hh"
 #include "interval.hh"
 #include "string.hh"
@@ -29,7 +28,7 @@ Atom::check_infinity_b ()const
       if (abs (off_[ax]) >= 100 CM)
        {
          warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
-                  global_lookup_l->print_dimen (off_[ax])));
+                  print_dimen (off_[ax])));
          
          if (experimental_features_global_b)
            assert (false);
@@ -66,25 +65,19 @@ Atom::extent () const
 }
 
 
+
 Atom::Atom ()
   : dim_ (Interval (0,0),Interval (0,0))
 {
-  /*
-    urg
-    We should probably make Atom an abstract base class to
-    derive Ps_atom and Tex_atom from.
-    But Atom is used as a simple type *everywhere*,
-    and we don't have virtual contructors.
-   */
-  lambda_ = 0;
-  str_ = global_lookup_l->unknown_str ();
+  str_ = "unknown\n";
+  origin_l_ = 0;
 }
 
 Atom::Atom (String s, Box b)
   :  dim_ (b)
 {
-  lambda_ = 0;
   str_ = s;
+  origin_l_ = 0;  
 }
 
 
@@ -98,11 +91,10 @@ Atom::str () const
 Offset
 Atom::offset () const
 {
+  check_infinity_b ();
   return off_;
 }
 
-
-
 void
 Atom::translate_axis (Real r, Axis a)
 {