Merge pull request #51982 from reduz/fix-doctool-merging-when-signatures-change
Fix doctool merges when method signatures don't match
This commit is contained in:
commit
e42628cd99
1 changed files with 32 additions and 25 deletions
|
@ -64,11 +64,17 @@ void DocTools::merge_from(const DocTools &p_data) {
|
|||
if (cf.methods[j].name != m.name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const char *operator_prefix = "operator "; // Operators use a space at the end, making this prefix an invalid identifier (and differentiating from methods).
|
||||
|
||||
if (cf.methods[j].name == c.name || cf.methods[j].name.begins_with(operator_prefix)) {
|
||||
// Since constructors and operators can repeat, we need to check the type of
|
||||
// the arguments so we make sure they are different.
|
||||
|
||||
if (cf.methods[j].arguments.size() != m.arguments.size()) {
|
||||
continue;
|
||||
}
|
||||
// since polymorphic functions are allowed we need to check the type of
|
||||
// the arguments so we make sure they are different.
|
||||
|
||||
int arg_count = cf.methods[j].arguments.size();
|
||||
Vector<bool> arg_used;
|
||||
arg_used.resize(arg_count);
|
||||
|
@ -94,6 +100,7 @@ void DocTools::merge_from(const DocTools &p_data) {
|
|||
if (not_the_same) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const DocData::MethodDoc &mf = cf.methods[j];
|
||||
|
||||
|
|
Loading…
Reference in a new issue