- enhancement: Improve code completion suggestion for arrays.

This commit is contained in:
Roy Qu 2023-03-26 19:05:38 +08:00
parent 405315bd8e
commit cd17c7cbca
2 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Red Panda C++ Version 2.19
- change: Use ctrl+K,ctrl+S as the shortcut for "save all". - change: Use ctrl+K,ctrl+S as the shortcut for "save all".
- fix: "Run all problem cases" with project is not correctly handled. - fix: "Run all problem cases" with project is not correctly handled.
- fix: When adding files to project and there'are duplicates, the warning info is not complete. - fix: When adding files to project and there'are duplicates, the warning info is not complete.
- enhancement: Improve code completion suggestion for arrays.
Red Panda C++ Version 2.18 Red Panda C++ Version 2.18

View File

@ -5061,6 +5061,13 @@ PEvalStatement CppParser::doCreateEvalVariable(
pointerLevel, pointerLevel,
templateParams); templateParams);
} }
if (!varStatement->args.isEmpty()) {
int j = 0;
while ((j = varStatement->args.indexOf("[", j)) != -1) {
++j;
pointerLevel++;
}
}
// qDebug()<<"parse ..."<<baseType<<pointerLevel; // qDebug()<<"parse ..."<<baseType<<pointerLevel;
return std::make_shared<EvalStatement>( return std::make_shared<EvalStatement>(
baseType, baseType,