diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 21:07:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-02 21:07:03 -0300 |
commit | 23441ec8676f6d804692fe1e49e7fea2bec55341 (patch) | |
tree | 9a7cc1188652695bfaf11b3cc85c7d34dfb0bc34 /tools/doc/doc_data.cpp | |
parent | 939c5f5c9effce84b55d1ff1ead33dda62c5d3d6 (diff) |
Added var2bytes and bytes2var to convet any variable to bytes and back. Closes #2075
Diffstat (limited to 'tools/doc/doc_data.cpp')
-rw-r--r-- | tools/doc/doc_data.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 96fd3f6b68..a039c58ff4 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -584,7 +584,10 @@ void DocData::generate(bool p_basic_types) { md.name=mi.name; if (mi.return_val.name!="") md.return_type=mi.return_val.name; - else + else if (mi.name.find(":")!=-1) { + md.return_type=mi.name.get_slice(":",1); + md.name=mi.name.get_slice(":",0); + } else md.return_type=Variant::get_type_name(mi.return_val.type); for(int i=0;i<mi.arguments.size();i++) { @@ -594,8 +597,9 @@ void DocData::generate(bool p_basic_types) { ArgumentDoc ad; ad.name=pi.name; + if (pi.type==Variant::NIL) - ad.type="var"; + ad.type="Variant"; else ad.type=Variant::get_type_name( pi.type ); |