mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Core: Sidestep GCC false-positives
(cherry picked from commit acdb8667b5)
Adds some more fixes for 4.5.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
committed by
Rémi Verschelde
parent
6b017abaa4
commit
36e2050eea
@@ -1938,7 +1938,8 @@ void TileMapLayer::set_tile_data(TileMapLayer::DataFormat p_format, const Vector
|
||||
for (int i = 0; i < c; i += offset) {
|
||||
const uint8_t *ptr = (const uint8_t *)&r[i];
|
||||
uint8_t local[12];
|
||||
for (int j = 0; j < ((p_format >= TileMapLayer::FORMAT_2) ? 12 : 8); j++) {
|
||||
const int buffer_size = (p_format >= TileMapLayer::FORMAT_2) ? 12 : 8;
|
||||
for (int j = 0; j < buffer_size; j++) {
|
||||
local[j] = ptr[j];
|
||||
}
|
||||
|
||||
|
||||
@@ -157,6 +157,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