diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/core_bind.cpp | 14 | ||||
-rw-r--r-- | core/os/main_loop.cpp | 4 | ||||
-rw-r--r-- | core/os/main_loop.h | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 12fca4215a..9e96d4b079 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -355,20 +355,20 @@ void _OS::print_all_textures_by_size() { List<Ref<Resource>> rsrc; ResourceCache::get_cached_resources(&rsrc); - for (Ref<Resource> E : rsrc) { - if (!E->is_class("ImageTexture")) { + for (Ref<Resource> &res : rsrc) { + if (!res->is_class("ImageTexture")) { continue; } - Size2 size = E->call("get_size"); - int fmt = E->call("get_format"); + Size2 size = res->call("get_size"); + int fmt = res->call("get_format"); _OSCoreBindImg img; img.size = size; img.fmt = fmt; - img.path = E->get_path(); + img.path = res->get_path(); img.vram = Image::get_image_data_size(img.size.width, img.size.height, Image::Format(img.fmt)); - img.id = E->get_instance_id(); + img.id = res->get_instance_id(); total += img.vram; imgs.push_back(img); } @@ -387,7 +387,7 @@ void _OS::print_resources_by_type(const Vector<String> &p_types) { List<Ref<Resource>> resources; ResourceCache::get_cached_resources(&resources); - for (Ref<Resource> r : resources) { + for (const Ref<Resource> &r : resources) { bool found = false; for (int i = 0; i < p_types.size(); i++) { diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index 016d9d0a09..3c0e56f5a8 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -66,7 +66,7 @@ void MainLoop::initialize() { } } -bool MainLoop::physics_process(float p_time) { +bool MainLoop::physics_process(double p_time) { if (get_script_instance()) { return get_script_instance()->call("_physics_process", p_time); } @@ -74,7 +74,7 @@ bool MainLoop::physics_process(float p_time) { return false; } -bool MainLoop::process(float p_time) { +bool MainLoop::process(double p_time) { if (get_script_instance()) { return get_script_instance()->call("_process", p_time); } diff --git a/core/os/main_loop.h b/core/os/main_loop.h index 34e944709b..b42e9b18ff 100644 --- a/core/os/main_loop.h +++ b/core/os/main_loop.h @@ -60,8 +60,8 @@ public: }; virtual void initialize(); - virtual bool physics_process(float p_time); - virtual bool process(float p_time); + virtual bool physics_process(double p_time); + virtual bool process(double p_time); virtual void finalize(); void set_initialize_script(const Ref<Script> &p_initialize_script); |