Skip to content

Commit d9993eb

Browse files
committed
fix misleading comment + refactor code to better show an actual if/else structure
1 parent 5a7db4f commit d9993eb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/org/bridj/demangling/GCC4Demangler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public TemplateArg parseTemplateArg() throws DemanglingException {
118118
public TypeRef parseType() throws DemanglingException {
119119
if (Character.isDigit(peekChar())) {
120120
Ident name = ensureOfType(parseNonCompoundIdent(), Ident.class);
121-
String id = nextShortcutId(); // we get the id before parsing the part (might be template parameters and we need to get the ids in the right order)
121+
String id = nextShortcutId();
122122
TypeRef res = simpleType(name);
123123
typeShortcuts.put(id, res);
124124
return res;
@@ -152,8 +152,9 @@ public TypeRef parseType() throws DemanglingException {
152152
return typeShortcuts.get(templatedId);
153153
}
154154
}
155+
} else {
156+
position -= delta;
155157
}
156-
position -= delta;
157158
}
158159
}
159160
// WARNING/INFO/NB: we intentionally continue to the N case

0 commit comments

Comments
 (0)