Fix some problems with typecast handling.
- If the given type had no modifiers specified, the base type string wasn't being moved out of the input buffer, leading to it mistakenly being parsed as a modifier. This would result in errors for simple cases such as a cast to size_t. Thanks Axel for reporting.
This commit is contained in:
@@ -50,11 +50,10 @@ CLanguageFamily::ParseTypeExpression(const BString& expression,
|
||||
modifierIndex = parsedName.FindFirst('&');
|
||||
if (modifierIndex == -1)
|
||||
modifierIndex = parsedName.FindFirst('[');
|
||||
if (modifierIndex == -1)
|
||||
modifierIndex = parsedName.Length();
|
||||
|
||||
if (modifierIndex >= 0)
|
||||
parsedName.MoveInto(baseTypeName, 0, modifierIndex);
|
||||
else
|
||||
baseTypeName = parsedName;
|
||||
parsedName.MoveInto(baseTypeName, 0, modifierIndex);
|
||||
|
||||
modifierIndex = parsedName.FindFirst('[');
|
||||
if (modifierIndex >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user