This commit is contained in:
Spartan322
2025-04-19 07:12:16 -04:00
5209 changed files with 229124 additions and 66199 deletions

View File

@@ -30,8 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
#ifndef DOC_DATA_H
#define DOC_DATA_H
#pragma once
#include "core/io/xml_parser.h"
#include "core/variant/variant.h"
@@ -117,7 +116,7 @@ public:
// Must be an operator or a constructor since there is no other overloading
if (name.left(8) == "operator") {
if (arguments.size() == p_method.arguments.size()) {
if (arguments.size() == 0) {
if (arguments.is_empty()) {
return false;
}
return arguments[0].type < p_method.arguments[0].type;
@@ -129,7 +128,7 @@ public:
// - 1. Default constructor: Foo()
// - 2. Copy constructor: Foo(Foo)
// - 3+. Other constructors Foo(Bar, ...) based on first argument's name
if (arguments.size() == 0 || p_method.arguments.size() == 0) { // 1.
if (arguments.is_empty() || p_method.arguments.is_empty()) { // 1.
return arguments.size() < p_method.arguments.size();
}
if (arguments[0].type == return_type || p_method.arguments[0].type == p_method.return_type) { // 2.
@@ -797,8 +796,8 @@ public:
if (p_dict.has("enums")) {
enums = p_dict["enums"];
}
for (int i = 0; i < enums.size(); i++) {
doc.enums[enums.get_key_at_index(i)] = EnumDoc::from_dict(enums.get_value_at_index(i));
for (const KeyValue<Variant, Variant> &kv : enums) {
doc.enums[kv.key] = EnumDoc::from_dict(kv.value);
}
Array properties;
@@ -982,5 +981,3 @@ public:
static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo);
static void method_doc_from_methodinfo(DocData::MethodDoc &p_method, const MethodInfo &p_methodinfo, const String &p_desc);
};
#endif // DOC_DATA_H