build(d3d12_x): use the macro-safe min and max in the code added by #43 #45

Manually merged
github merged 1 commit from gh-pr/45/head into gh-pr/45/base 2026-11-26 19:15:34 +00:00
Owner

@⁠Dark3581 on GitHub · 2026-11-22 20:49 UTC · original
Dark3581:fix/msvc-minmax → main · +4 −4 · 3 files · 1 commits · merged 2026-11-22 20:57 UTC

What

Follow-up to #38. Code that landed after #38 was opened (#43) called std::min and std::max after <windows.h>, whose macros break them under MSVC. The four remaining bare calls (vulkan/PipelineCompiler.cpp twice, vulkan/DescriptorTable.cpp, tests/PsoProbe.cpp) now use the (std::min)(...) form #38 uses. DescriptorTable.cpp does not see <windows.h> today; it is changed so the tree has no bare call left. No behaviour change.

Tested

Windows 10, Ninja, Release, current main (with #38 and #44):

  • MSVC 2022 17.12 (19.42), Windows SDK 10.0.22621: everything builds except ab_gameinput.dll, whose link needs gameinput.lib, which this SDK does not ship (unrelated). CTest 61/61.
  • MinGW (WinLibs GCC 15.2 UCRT): build without warning, CTest 61/61.
  • python tools/check_conventions.py: ok.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md (none: build fix)
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • Source of behaviour: n/a
  • AI-assisted: yes
**@⁠Dark3581** on GitHub · 2026-11-22 20:49 UTC · [original](https://github.com/Dark3581/AnyBox/pull/45) `Dark3581:fix/msvc-minmax` → `main` · +4 −4 · 3 files · 1 commits · merged 2026-11-22 20:57 UTC ### What Follow-up to #38. Code that landed after #38 was opened (#43) called `std::min` and `std::max` after `<windows.h>`, whose macros break them under MSVC. The four remaining bare calls (`vulkan/PipelineCompiler.cpp` twice, `vulkan/DescriptorTable.cpp`, `tests/PsoProbe.cpp`) now use the `(std::min)(...)` form #38 uses. `DescriptorTable.cpp` does not see `<windows.h>` today; it is changed so the tree has no bare call left. No behaviour change. ### Tested Windows 10, Ninja, Release, current `main` (with #38 and #44): - MSVC 2022 17.12 (19.42), Windows SDK 10.0.22621: everything builds except `ab_gameinput.dll`, whose link needs `gameinput.lib`, which this SDK does not ship (unrelated). CTest 61/61. - MinGW (WinLibs GCC 15.2 UCRT): build without warning, CTest 61/61. - `python tools/check_conventions.py`: ok. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` (none: build fix) - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] Source of behaviour: n/a - [x] AI-assisted: yes
ReadWholeFile, WriteWholeFile and pso_probe called std::min and std::max after <windows.h>, which MSVC expands as macros. They now use the (std::min)(...) form.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:15:32 +00:00
github manually merged commit ea2c8b2f93 into gh-pr/45/base 2026-11-26 19:15:34 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.