issues
search
alliedmodders
/
hl2sdk
Half-Life 2 SDK Mirrors
https://github.com/valvesoftware
353
stars
173
forks
source link
[CS2] Fix compilation errors for std=c++2a
#146
Closed
mixern6
closed
1 year ago
mixern6
commented
1 year ago
The PR fixes these compilation errors:
error: increment of object of volatile-qualified type 'volatile int' is deprecated
error: ISO C++17 does not allow 'register' storage class specifier
error: too many arguments provided to function-like macro invocation clamp
Explanation:
Incrementing of a volatile type is deprecated but can be replaced with assignment of the incremented value.
Register storage is not allowed, but it is just a hint and the keyword can be safely removed:
https://stackoverflow.com/a/3207025/18259736
The clamp macro is no longer required and can be excluded:
https://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg474109.html
There's a clamp function defined in basetypes.h in hl2sdk codebase so it gets picked up.
GAMMACASE
commented
1 year ago
Thanks
The PR fixes these compilation errors:
Explanation: