]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/global-ctor.cc
Run `make grand-replace'.
[lilypond.git] / lily / global-ctor.cc
index da204ebd8603f37dc979a18de8ffcbd2213bac50..cfc75fb135e72b7b709b697d9ac791910ed73ab5 100644 (file)
@@ -1,27 +1,28 @@
-/*   
-  global-ctor.cc --  implement global constructors
-  
+/*
+  global-ctor.cc -- implement global constructors
+
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+
+  (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
+
 #include "global-ctor.hh"
-#include "array.hh"
 
-static Array<Global_ctor> *ctor_global_static_arr_p_;
+#include "std-vector.hh"
+
+static vector<Global_ctor> *ctor_global_statics_;
 
 void
 add_constructor (Global_ctor c)
 {
-  if (!ctor_global_static_arr_p_)
-    ctor_global_static_arr_p_ = new Array<Global_ctor>;
-  ctor_global_static_arr_p_->push (c);
+  if (!ctor_global_statics_)
+    ctor_global_statics_ = new vector<Global_ctor>;
+  ctor_global_statics_->push_back (c);
 }
 
 void
 call_constructors ()
 {
-  for (int i=0; i < ctor_global_static_arr_p_->size (); i++)
-    (ctor_global_static_arr_p_->elem (i)) ();
+  for (vsize i = 0; i < ctor_global_statics_->size (); i++)
+    (ctor_global_statics_->at (i)) ();
 }