Merge pull request #84952 from alesliehughes/renderer_viewport_sizeof

Renderer Viewport correct `sizeof` usage.
This commit is contained in:
Rémi Verschelde 2023-11-16 10:54:15 +01:00
commit 60c40ed809
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -1387,7 +1387,7 @@ void RendererViewport::viewport_set_sdf_oversize_and_scale(RID p_viewport, RS::V
RID RendererViewport::viewport_find_from_screen_attachment(DisplayServer::WindowID p_id) const { RID RendererViewport::viewport_find_from_screen_attachment(DisplayServer::WindowID p_id) const {
RID *rids = nullptr; RID *rids = nullptr;
uint32_t rid_count = viewport_owner.get_rid_count(); uint32_t rid_count = viewport_owner.get_rid_count();
rids = (RID *)alloca(sizeof(RID *) * rid_count); rids = (RID *)alloca(sizeof(RID) * rid_count);
viewport_owner.fill_owned_buffer(rids); viewport_owner.fill_owned_buffer(rids);
for (uint32_t i = 0; i < rid_count; i++) { for (uint32_t i = 0; i < rid_count; i++) {
Viewport *viewport = viewport_owner.get_or_null(rids[i]); Viewport *viewport = viewport_owner.get_or_null(rids[i]);