Skip to content

Remove FixSnprintf.h#367

Merged
marktsuchida merged 2 commits intomainfrom
remove-fixsnprintf-h
Aug 26, 2023
Merged

Remove FixSnprintf.h#367
marktsuchida merged 2 commits intomainfrom
remove-fixsnprintf-h

Conversation

@marktsuchida
Copy link
Member

This file was there to allow the code to compile with either Visual Studio 2010 or VS2015+.
It is no longer necessary or useful (we don't support compiling with anything older than VS2019), and currently has no effect.

Since people keep copy-pasting the inclusion of this file (even where snprintf() is not used!), let's get rid of it for good.

There is also often an adjacent #include <Windows.h> that is cargo culted in many cases, but that is harder to mechanically remove because sometimes it is actually needed.

No change to device interface.

This was only needed to compile with Visual Studio 2010.
It is no longer necessary with modern MSVC (doesn't do anything).

Just in case, checked that the return value of snprintf() is not used
(since it deffers from that of _snprintf()). It was only used by
WOSM_rev.cpp, which is a recently added file (never built with old
MSVC).
This is obsolete.

Checked that the return value of snprintf() is not used (in fact,
snprintf() is not used in the changed files).
@henrypinkard
Copy link
Contributor

Great!

@marktsuchida marktsuchida merged commit 90f4cdd into main Aug 26, 2023
@marktsuchida marktsuchida deleted the remove-fixsnprintf-h branch August 26, 2023 16:22
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