Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong return value in some virtual method bindings #14505

Merged
merged 1 commit into from
Dec 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/math/a_star.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_path", "from_id", "to_id"), &AStar::get_point_path);
ClassDB::bind_method(D_METHOD("get_id_path", "from_id", "to_id"), &AStar::get_id_path);

BIND_VMETHOD(MethodInfo("_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
BIND_VMETHOD(MethodInfo("_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
BIND_VMETHOD(MethodInfo(Variant::REAL, "_estimate_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
BIND_VMETHOD(MethodInfo(Variant::REAL, "_compute_cost", PropertyInfo(Variant::INT, "from_id"), PropertyInfo(Variant::INT, "to_id")));
}

AStar::AStar() {
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/AStar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</demos>
<methods>
<method name="_compute_cost" qualifiers="virtual">
<return type="void">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
Expand All @@ -24,7 +24,7 @@
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
<return type="void">
<return type="float">
</return>
<argument index="0" name="from_id" type="int">
</argument>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/CubeMap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality">
The lossy storage quality of the [code]CubeMap[/code] if the storage mode is set to STORAGE_COMPRESS_LOSSY.
</member>
<member name="storage_mode" type="CubeMap.Storage" setter="set_storage" getter="get_storage" enum="CubeMap.Storage">
<member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage">
The [code]CubeMap[/code]'s storage mode. See [code]STORAGE_*[/code] constants.
</member>
</members>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/EditorResourceConversionPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</description>
</method>
<method name="_converts_to" qualifiers="virtual">
<return type="bool">
<return type="String">
</return>
<description>
</description>
Expand Down
32 changes: 32 additions & 0 deletions doc/classes/PopupMenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@
<description>
</description>
</method>
<method name="is_hide_on_state_item_selection" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool">
</return>
Expand Down Expand Up @@ -278,6 +284,14 @@
Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
</description>
</method>
<method name="set_hide_on_state_item_selection">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_item_accelerator">
<return type="void">
</return>
Expand Down Expand Up @@ -377,6 +391,16 @@
<description>
</description>
</method>
<method name="set_item_statable">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="state" type="int">
</argument>
<description>
</description>
</method>
<method name="set_item_submenu">
<return type="void">
</return>
Expand Down Expand Up @@ -417,6 +441,14 @@
<description>
</description>
</method>
<method name="toggle_item_statable">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
</method>
</methods>
<members>
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection">
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/TileSet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</demos>
<methods>
<method name="_forward_subtile_selection" qualifiers="virtual">
<return type="void">
<return type="Vector2">
</return>
<argument index="0" name="autotile_id" type="int">
</argument>
Expand All @@ -27,7 +27,7 @@
</description>
</method>
<method name="_is_tile_bound" qualifiers="virtual">
<return type="void">
<return type="bool">
</return>
<argument index="0" name="drawn_id" type="int">
</argument>
Expand Down
2 changes: 1 addition & 1 deletion editor/property_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void EditorResourceConversionPlugin::_bind_methods() {
mi.name = "_handles";
mi.return_val = PropertyInfo(Variant::BOOL, "");

BIND_VMETHOD(MethodInfo(Variant::BOOL, "_converts_to"));
BIND_VMETHOD(MethodInfo(Variant::STRING, "_converts_to"));
}

String EditorResourceConversionPlugin::converts_to() const {
Expand Down
4 changes: 2 additions & 2 deletions scene/resources/tile_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ void TileSet::_bind_methods() {
ClassDB::bind_method(D_METHOD("find_tile_by_name", "name"), &TileSet::find_tile_by_name);
ClassDB::bind_method(D_METHOD("get_tiles_ids"), &TileSet::_get_tiles_ids);

BIND_VMETHOD(MethodInfo("_is_tile_bound", PropertyInfo(Variant::INT, "drawn_id"), PropertyInfo(Variant::INT, "neighbor_id")));
BIND_VMETHOD(MethodInfo("_forward_subtile_selection", PropertyInfo(Variant::INT, "autotile_id"), PropertyInfo(Variant::INT, "bitmask"), PropertyInfo(Variant::OBJECT, "tilemap", PROPERTY_HINT_NONE, "TileMap"), PropertyInfo(Variant::VECTOR2, "tile_location")));
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_is_tile_bound", PropertyInfo(Variant::INT, "drawn_id"), PropertyInfo(Variant::INT, "neighbor_id")));
BIND_VMETHOD(MethodInfo(Variant::VECTOR2, "_forward_subtile_selection", PropertyInfo(Variant::INT, "autotile_id"), PropertyInfo(Variant::INT, "bitmask"), PropertyInfo(Variant::OBJECT, "tilemap", PROPERTY_HINT_NONE, "TileMap"), PropertyInfo(Variant::VECTOR2, "tile_location")));

BIND_ENUM_CONSTANT(BITMASK_2X2);
BIND_ENUM_CONSTANT(BITMASK_3X3);
Expand Down