diff --git a/CHANGELOG.md b/CHANGELOG.md index b5fd5634..5c3fd33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Fix `Parser` for function parameters contained in template arguments ([pull #693](https://github.com/bytedeco/javacpp/pull/693)) * Fix `Parser` on function pointer declarations starting with `typedef struct` ([pull bytedeco/javacpp-presets#1361](https://github.com/bytedeco/javacpp-presets/pull/1361)) ### June 6, 2023 version 1.5.9 diff --git a/src/main/java/org/bytedeco/javacpp/tools/Parser.java b/src/main/java/org/bytedeco/javacpp/tools/Parser.java index 90be0fd6..2e508b8a 100644 --- a/src/main/java/org/bytedeco/javacpp/tools/Parser.java +++ b/src/main/java/org/bytedeco/javacpp/tools/Parser.java @@ -642,9 +642,9 @@ Type[] templateArguments(Context context) throws ParserException { Parameters p = parameters(context, 0, false); if (p != null) { // Build prototype string, without space after comma - type.cppName += '('; + type.cppName += "("; String separator = ""; - for (Declarator d: p.declarators) { + for (Declarator d : p.declarators) { if (d != null) { String s = d.type.cppName; if (d.type.constValue && !s.startsWith("const ")) { @@ -666,7 +666,7 @@ Type[] templateArguments(Context context) throws ParserException { separator = ","; } } - type.cppName += ')'; + type.cppName += ")"; token = tokens.get(); if (token.match('<')) { // probably an actual less than, skip.