Skip to content

Added IsMapbase() defined funtion #438

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Unusuario2
Copy link

@Unusuario2 Unusuario2 commented Jun 17, 2025

This PR introduces a small utility macro IsMapbase() to improve readability and maintainability when working with Mapbase-dependent code.

Future updates will support larger mods with many Mapbase features. Using #ifdef MAPBASE everywhere can clutter the code or take multiple lines. Adding IsMapbase() gives programmers a cleaner, one-line way to check for Mapbase support.

Example:
if constexpr (IsMapbase()) { // Mapbase-specific logic }
instead of
#ifdef MAPBASE // Mapbase-specific logic #endif //MAPBASE


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

@Unusuario2 Unusuario2 changed the base branch from master to develop June 27, 2025 15:03
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