-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename min/max macros to D3_min/D3_max
These only cause trouble in stdlib headers, such as: ``` /usr/include/c++/12/limits:1828:13: error: expected unqualified-id before ‘noexcept’ 1828 | max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; } | ^~~~~~~~~~~~~~~~~~~~~ Descent3/d3music/musicapi.cpp: In function ‘void D3MusicSetVolume(float)’: Descent3/d3music/musicapi.cpp:167:57: error: ‘std::numeric_limits<float>::min’ cannot be used as a function 167 | const float kEpsilon = std::numeric_limits<float>::min(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ ``` plus there is the whole NOMINMAX situation on Windows. And don't introduce <algorithm> just for that. Automated via: $ sed -i 's/_\?_\?min *(\(.*\),/D3_min(\1,/' `git grep -l min` $ sed -i 's/_\?_\?max *(\(.*\),/D3_max(\1,/' `git grep -l max` plus remove duplicates from lib/Macros.h + lib/linux/linux_fix.h and fix netgames/dmfc/dmfcstats.cpp (2x min on one line) manually.
- Loading branch information
Showing
60 changed files
with
302 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.