Skip to content

Assortment of code correctness fixes#551

Draft
azzyr wants to merge 9 commits into
mapbase-mp-2025from
feature/cpp-correctness
Draft

Assortment of code correctness fixes#551
azzyr wants to merge 9 commits into
mapbase-mp-2025from
feature/cpp-correctness

Conversation

@azzyr

@azzyr azzyr commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This PR is mostly aimed towards Mapbase-derivative projects looking to migrate to modern C++ toolsets. Care is being taken to maintain compatibility with the original C++14 GCC/MSVC toolsets.

  • The addition of the concept reserved keyword in C++20 affects Response Rules code. Variable names using that keyword have been renamed across the board
  • MSVC enables /permissive- (and by extension /Zc:strictstrings) by default, which affects a lot of older code. Const qualifiers were added to function signatures and variable declarations across the codebase
  • Removed some redundant operator overloads causing ambiguity with C++20's rewritten and synthesized expressions. Modern compilers handle implicit casts fine without C++98-era tricks.
  • Fixes for various other warnings that Clang catches

Does this PR close any issues?

  • None

PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

azzyr added 9 commits July 23, 2026 18:59
Main pain point with porting to newer C++ versions currently is the addition of the "concept" reserved keyword
These cause ambiguous overloads when C++20's rewritten and synthesized expressions come into play.
Valve wrote these in the C++98/03 era... C++11/14 on modern compilers handles implicit casts fine
The bool overload should probably be marked as explicit but I'd rather not mess with code using NULL over nullptr
C++20 mode MSVC enables /permissive- which strictly enforces name lookup rules for templates so we explicitly qualify them
This is wrong anyway.. /permissive-
This isn't a compile error but the warning shows up a lot in modern C++
@azzyr
azzyr marked this pull request as draft July 24, 2026 00:30
@azzyr azzyr changed the title WIP: Assortment of code correctness fixes Assortment of code correctness fixes Jul 24, 2026
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.

1 participant