Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / lily / dimension-cache.cc
blob3eb0a89cb31c5e0f8cebcb6d90d3da58dba6fbec
1 /*
2 dimension-cache.cc -- implement Dimension_cache
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
10 #include "dimension-cache.hh"
12 #include "warn.hh"
13 #include "grob.hh"
15 Dimension_cache::Dimension_cache (Dimension_cache const &d)
17 init ();
18 offset_ = d.offset_ ? new Real (*d.offset_) : 0;
19 parent_ = d.parent_;
20 extent_ = d.extent_ ? new Interval (*d.extent_) : 0;
23 Dimension_cache::Dimension_cache ()
25 init ();
28 void
29 Dimension_cache::init ()
31 offset_ = 0;
32 extent_ = 0;
33 parent_ = 0;
36 Dimension_cache::~Dimension_cache ()
38 clear ();
41 void
42 Dimension_cache::clear ()
44 delete extent_;
45 delete offset_;
46 extent_ = 0;
47 offset_ = 0;