Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC warnings in stores.cpp #6867

Merged
merged 1 commit into from
Dec 17, 2023
Merged

Conversation

obligaron
Copy link
Contributor

This PR reduces warnings by 4 (from 17 to 13).

I thought about doing more refactoring... but stores.cpp needs a more general approach.

Now only mpq_writer and mpq_sdl_rwops is missing. And there I'm unsure if I should change everything size related to size_t, uint32_t or uintmax_t. 😁

@AJenbo
Copy link
Member

AJenbo commented Dec 17, 2023

Store needs a rewrite, it's a mess :/

@AJenbo AJenbo merged commit ecb781d into diasurgical:master Dec 17, 2023
23 checks passed
@obligaron obligaron deleted the swarning branch December 17, 2023 18:43
@AJenbo
Copy link
Member

AJenbo commented Dec 17, 2023

Now only mpq_writer and mpq_sdl_rwops is missing. And there I'm unsure if I should change everything size related to size_t, uint32_t or uintmax_t. 😁

Since it's dealing with files I would have thought size_t would be the right option

@obligaron
Copy link
Contributor Author

Since it's dealing with files I would have thought size_t would be the right option

It's also complicated...

libmpq has

/* file offset data type for API*/
typedef int64_t libmpq__off_t;

SDL SDL_RWops needs

#ifndef USE_SDL1
using OffsetType = Sint64;
using SizeType = size_t;
#else
using OffsetType = int;
using SizeType = int;
#endif

🤔

@AJenbo
Copy link
Member

AJenbo commented Dec 17, 2023

Mmm, I see what you are saying. Well if it's any help SDL1 is the fall back so it should have all the ugly casts and we should go with what SDL2 preferes when that comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants