Lines 86-91
const char *ResType::FindVar(const char *name,const Re
Link Here
|
86 |
const ResType *exact_name=0; |
86 |
const ResType *exact_name=0; |
87 |
int sub=0; |
87 |
int sub=0; |
88 |
|
88 |
|
|
|
89 |
if(!types_by_name) |
90 |
types_by_name=new xmap<ResType*>; |
91 |
|
89 |
*type=types_by_name->lookup(name); |
92 |
*type=types_by_name->lookup(name); |
90 |
if(*type) |
93 |
if(*type) |
91 |
goto found; // exact match |
94 |
goto found; // exact match |
Lines 266-271
static int RefResourceCompare(const Ref<Resource> *a,c
Link Here
|
266 |
char *ResType::Format(bool with_defaults,bool only_defaults) |
269 |
char *ResType::Format(bool with_defaults,bool only_defaults) |
267 |
{ |
270 |
{ |
268 |
RefArray<Resource> created; |
271 |
RefArray<Resource> created; |
|
|
272 |
|
273 |
if(!types_by_name) |
274 |
types_by_name=new xmap<ResType*>; |
275 |
|
269 |
if(with_defaults || only_defaults) |
276 |
if(with_defaults || only_defaults) |
270 |
{ |
277 |
{ |
271 |
for(ResType *dscan=types_by_name->each_begin(); dscan; dscan=types_by_name->each_next()) |
278 |
for(ResType *dscan=types_by_name->each_begin(); dscan; dscan=types_by_name->each_next()) |
Lines 301-306
char *ResType::Format(bool with_defaults,bool only_def
Link Here
|
301 |
char **ResType::Generator(void) |
308 |
char **ResType::Generator(void) |
302 |
{ |
309 |
{ |
303 |
StringSet res; |
310 |
StringSet res; |
|
|
311 |
|
312 |
if(!types_by_name) |
313 |
types_by_name=new xmap<ResType*>; |
304 |
|
314 |
|
305 |
for(ResType *dscan=types_by_name->each_begin(); dscan; dscan=types_by_name->each_next()) |
315 |
for(ResType *dscan=types_by_name->each_begin(); dscan; dscan=types_by_name->each_next()) |
306 |
if(!dscan->IsAlias()) |
316 |
if(!dscan->IsAlias()) |