Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Fix 10 MSVC narrowing cast warnings from irrString and irrArray #261

Merged
merged 2 commits into from Dec 17, 2023

Conversation

JosiahWI
Copy link
Contributor

@JosiahWI JosiahWI commented Dec 16, 2023

It seems these data structures sizes are intended to be limited to what fits in a u32 by the current implementation, so I've resolved the warnings by casting the sizes of the underlying STL types.

I saw these warnings in a Visual Studio 17 2022 Debug build with current master.

The irrString implementation doesn't allow constructing a string with a
size that would exceed a u32, so it should be safe to narrow the size of
the underlying STL container back to a u32.

This fixes 5 narrowing cast warnings from Visual Studio 17 2022.
This fixes 5 narrowing cast warnings from Visual Studio 17 2022.
@sfan5 sfan5 merged commit 854e97f into minetest:master Dec 17, 2023
14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants