summaryrefslogtreecommitdiff
path: root/tools/doc/doc_data.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/doc/doc_data.cpp')
-rw-r--r--tools/doc/doc_data.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 2d0d7617c2..0c4751979c 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -61,6 +61,27 @@ void DocData::merge_from(const DocData& p_data) {
continue;
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);
+ for (int l = 0; l < arg_count; ++l) arg_used[l] = false;
+ // also there is no guarantee that argument ordering will match, so we
+ // have to check one by one so we make sure we have an exact match
+ for (int k = 0; k < arg_count; ++k) {
+ for (int l = 0; l < arg_count; ++l)
+ if (cf.methods[j].arguments[k].type == m.arguments[l].type && !arg_used[l]) {
+ arg_used[l] = true;
+ break;
+ }
+ }
+ bool not_the_same = false;
+ for (int l = 0; l < arg_count; ++l)
+ if (!arg_used[l]) // at least one of the arguments was different
+ not_the_same = true;
+ if (not_the_same)
+ continue;
const MethodDoc &mf = cf.methods[j];
@@ -267,6 +288,7 @@ void DocData::generate(bool p_basic_types) {
case Variant::INT_ARRAY:
case Variant::REAL_ARRAY:
case Variant::STRING_ARRAY: //25
+ case Variant::VECTOR2_ARRAY:
case Variant::VECTOR3_ARRAY:
case Variant::COLOR_ARRAY:
default_arg_text=Variant::get_type_name(default_arg.get_type())+"("+default_arg_text+")";
@@ -967,6 +989,8 @@ Error DocData::save(const String& p_path) {
PropertyDoc &p=c.properties[i];
_write_string(f,2,"<member name=\""+p.name+"\" type=\""+p.type+"\">");
+ if (p.description!="")
+ _write_string(f,3,p.description.xml_escape());
_write_string(f,2,"</member>");
}