Merge pull request #66545 from akien-mga/msvc-warnings-c4324-c4389-c4456-c4459

Fix MSVC warnings C4324, C4389, C4456, and C4459
This commit is contained in:
Rémi Verschelde 2022-09-28 20:47:43 +02:00
commit 0dd308cedd
9 changed files with 111 additions and 11 deletions

View file

@ -1149,7 +1149,7 @@ TypedArray<Vector3i> GridMap::get_used_cells() const {
TypedArray<Vector3i> GridMap::get_used_cells_by_item(int p_item) const {
TypedArray<Vector3i> a;
for (const KeyValue<IndexKey, Cell> &E : cell_map) {
if (E.value.item == p_item) {
if ((int)E.value.item == p_item) {
Vector3i p(E.key.x, E.key.y, E.key.z);
a.push_back(p);
}

View file

@ -79,6 +79,9 @@ if env["builtin_embree"]:
else:
env.Append(LIBS=["psapi"])
if env.msvc: # Disable bogus warning about intentional struct padding.
env_raycast.Append(CCFLAGS=["/wd4324"])
env_thirdparty = env_raycast.Clone()
env_thirdparty.force_optimization_on_debug()
env_thirdparty.disable_warnings()