From bef75645dd01c9d9e1d375e0e3426eac809875f7 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 11 Oct 2005 10:09:23 +0000 Subject: fix for Codewarrior compilation svn path=/trunk/; revision=3691 --- externals/grill/flext/source/fllib.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'externals/grill/flext/source/fllib.cpp') diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp index b28bda5a..b41a744e 100755 --- a/externals/grill/flext/source/fllib.cpp +++ b/externals/grill/flext/source/fllib.cpp @@ -18,6 +18,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include #include #include +#include #define ALIASDEL ',' @@ -127,16 +128,17 @@ flext_class::flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*fr , dist(false) {} - typedef TablePtrMap LibMap; - -static LibMap libnames; +// static initialization (with constructor) doesn't work for Codewarrior +static LibMap *libnames = NULL; //! Store or retrieve registered classes static flext_class *FindName(const t_symbol *s,flext_class *o = NULL) { - flext_class *cl = libnames.find(s); - if(!cl) libnames.insert(s,cl = o); + if(!libnames) libnames = new LibMap; + flext_class *cl = libnames->find(s); + if(!cl && o) + libnames->insert(s,cl = o); return cl; } -- cgit v1.2.1