mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Core: Sidestep GCC false-positive
This commit is contained in:
committed by
Arctis-Fireblight
parent
71fb8d8368
commit
2097769f6e
@@ -32,7 +32,9 @@
|
||||
|
||||
#include "geometry_2d.h"
|
||||
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Walloc-zero")
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
GODOT_GCC_WARNING_POP
|
||||
#include "thirdparty/misc/polypartition.h"
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "thirdparty/misc/stb_rect_pack.h"
|
||||
|
||||
@@ -160,6 +160,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
|
||||
const NodeData *nd = &nodes[0];
|
||||
|
||||
Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc);
|
||||
ret_nodes[0] = nullptr; // Sidesteps "maybe uninitialized" false-positives on GCC.
|
||||
|
||||
bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user