Skip to content

Common: fix missing <cstdint> include in CPrimalGrid.hpp; drop duplicate <limits>#2629

Merged
bigfooted merged 2 commits intosu2code:developfrom
shbhmexe:bugfix/cstdint-include-primalgrid
Nov 25, 2025
Merged

Common: fix missing <cstdint> include in CPrimalGrid.hpp; drop duplicate <limits>#2629
bigfooted merged 2 commits intosu2code:developfrom
shbhmexe:bugfix/cstdint-include-primalgrid

Conversation

@shbhmexe
Copy link

Proposed Changes

This PR adds an explicit #include <cstdint> to CPrimalGrid.hpp to match the header’s use of int8_t for PeriodIndexNeighbors. It also removes a duplicated #include <limits>.

Rationale:

  • Ensures int8_t is always defined without depending on indirect includes.
  • Improves portability and header hygiene for strict/Windows toolchains.
  • No behavior or API change.

Related Work

None. This is a minimal maintenance fix isolated to a single header.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (header-only include hygiene).
  • My contribution is commented and consistent with SU2 style.
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have updated appropriate documentation if necessary (not applicable).

Impact

  • Functionality: unchanged.
  • Performance/Memory: unchanged.
  • CI: should have no effect on ASAN/TSAN builds and regression/unit tests because no logic changed.

…mits>

This header declares PeriodIndexNeighbors as int8_t but relied on indirect includes for the type.
Add an explicit #include <cstdint> to ensure portability across compilers and platforms
(MSVC/Clang/GCC), and deduplicate a repeated <limits> include. No functional/runtime changes;
this is a safe, hygiene-only fix that reduces the risk of build failures in strict toolchains
and keeps the header self-contained.

- Touches: Common/include/geometry/primal_grid/CPrimalGrid.hpp
- Behavior change: none
- Risk: low; header-only; does not affect algorithms, IO, or numerics

Signed-off-by: Shubham shukla
<shubhushukl586@gmail.com>
@shbhmexe
Copy link
Author

/label changelog:fix

@pcarruscag pcarruscag changed the base branch from master to develop November 24, 2025 18:08
@bigfooted
Copy link
Contributor

@shbhmexe thanks for the fix!

@shbhmexe
Copy link
Author

@shbhmexe thanks for the fix!

Will it be merged after this? I hope it gets merged. Thanks for the approval!

@bigfooted bigfooted merged commit bee3acf into su2code:develop Nov 25, 2025
38 checks passed
@shbhmexe
Copy link
Author

Thanks @bigfooted sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants