|
|
@ -355,12 +355,13 @@ namespace CodeGenerator |
|
|
|
TemplateType = templateType; |
|
|
|
TemplateType = templateType; |
|
|
|
ArraySize = asize; |
|
|
|
ArraySize = asize; |
|
|
|
int startBracket = name.IndexOf('['); |
|
|
|
int startBracket = name.IndexOf('['); |
|
|
|
if (startBracket != -1 && ArraySize == 0) |
|
|
|
if (startBracket != -1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//This is only for older cimgui binding jsons |
|
|
|
//This is only for older cimgui binding jsons |
|
|
|
int endBracket = name.IndexOf(']'); |
|
|
|
int endBracket = name.IndexOf(']'); |
|
|
|
string sizePart = name.Substring(startBracket + 1, endBracket - startBracket - 1); |
|
|
|
string sizePart = name.Substring(startBracket + 1, endBracket - startBracket - 1); |
|
|
|
ArraySize = ParseSizeString(sizePart, enums); |
|
|
|
if(ArraySize == 0) |
|
|
|
|
|
|
|
ArraySize = ParseSizeString(sizePart, enums); |
|
|
|
Name = Name.Substring(0, startBracket); |
|
|
|
Name = Name.Substring(0, startBracket); |
|
|
|
} |
|
|
|
} |
|
|
|
IsFunctionPointer = Type.IndexOf('(') != -1; |
|
|
|
IsFunctionPointer = Type.IndexOf('(') != -1; |
|
|
@ -517,4 +518,4 @@ namespace CodeGenerator |
|
|
|
return new OverloadDefinition(ExportedName, FriendlyName, parameters, DefaultValues, ReturnType, StructName, Comment, IsConstructor, IsDestructor); |
|
|
|
return new OverloadDefinition(ExportedName, FriendlyName, parameters, DefaultValues, ReturnType, StructName, Comment, IsConstructor, IsDestructor); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|