diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-16 15:44:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-16 15:44:04 +0100 |
commit | 224f5cab992e10fa1d197785942e60032b269577 (patch) | |
tree | 5d6e762d4e807cc8eca8a6ea19389fd0cee85e35 /editor/doc_tools.cpp | |
parent | 21b05a3944256ddbaf492731a86334f8a59b1772 (diff) | |
parent | ecfa570ccbcd6735bd42b09ac947ee57c57077ce (diff) |
Merge pull request #46378 from reduz/static-method-in-variant-types
Add static method support to core Variant types
Diffstat (limited to 'editor/doc_tools.cpp')
-rw-r--r-- | editor/doc_tools.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 47ea8cbe2a..e29c9593c3 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -394,13 +394,22 @@ void DocTools::generate(bool p_basic_types) { method.qualifiers += " "; } method.qualifiers += "const"; - } else if (E->get().flags & METHOD_FLAG_VARARG) { + } + + if (E->get().flags & METHOD_FLAG_VARARG) { if (method.qualifiers != "") { method.qualifiers += " "; } method.qualifiers += "vararg"; } + if (E->get().flags & METHOD_FLAG_STATIC) { + if (method.qualifiers != "") { + method.qualifiers += " "; + } + method.qualifiers += "static"; + } + for (int i = -1; i < E->get().arguments.size(); i++) { if (i == -1) { #ifdef DEBUG_METHODS_ENABLED @@ -647,6 +656,20 @@ void DocTools::generate(bool p_basic_types) { method.qualifiers += "vararg"; } + if (mi.flags & METHOD_FLAG_CONST) { + if (method.qualifiers != "") { + method.qualifiers += " "; + } + method.qualifiers += "const"; + } + + if (mi.flags & METHOD_FLAG_STATIC) { + if (method.qualifiers != "") { + method.qualifiers += " "; + } + method.qualifiers += "static"; + } + c.methods.push_back(method); } |