1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Get rid of easily removable uses of const_cast

This commit is contained in:
rune-scape
2024-07-29 21:23:12 -07:00
committed by rune-scape
parent 893bbdfde8
commit d58b2e879f
69 changed files with 342 additions and 306 deletions

View File

@@ -121,7 +121,7 @@ Ref<Resource> DedicatedServerExportPlugin::_customize_resource(const Ref<Resourc
if (p_resource.is_valid() && current_export_mode == EditorExportPreset::MODE_FILE_STRIP && p_resource->has_method("create_placeholder")) {
Callable::CallError err;
Ref<Resource> result = const_cast<Resource *>(p_resource.ptr())->callp("create_placeholder", nullptr, 0, err);
Ref<Resource> result = p_resource->callp("create_placeholder", nullptr, 0, err);
if (err.error == Callable::CallError::CALL_OK) {
return result;
}