1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix some issues found by cppcheck.

This commit is contained in:
bruvzg
2022-04-05 13:40:26 +03:00
parent 72407a9cfb
commit f851c4aa33
163 changed files with 776 additions and 767 deletions

View File

@@ -42,7 +42,7 @@
#endif
DisplayServerAndroid *DisplayServerAndroid::get_singleton() {
return (DisplayServerAndroid *)DisplayServer::get_singleton();
return static_cast<DisplayServerAndroid *>(DisplayServer::get_singleton());
}
bool DisplayServerAndroid::has_feature(Feature p_feature) const {
@@ -277,7 +277,7 @@ int64_t DisplayServerAndroid::window_get_native_handle(HandleType p_handle_type,
return 0; // Not supported.
}
case WINDOW_HANDLE: {
return (int64_t)((OS_Android *)OS::get_singleton())->get_godot_java()->get_activity();
return reinterpret_cast<int64_t>(static_cast<OS_Android *>(OS::get_singleton())->get_godot_java()->get_activity());
}
case WINDOW_VIEW: {
return 0; // Not supported.