Fix Windows build under NOMINMAX: use std::max - #48
Conversation
The WIN32 branch uses unqualified max, which only compiles when windows.h's max macro is defined. NOMINMAX builds fail on this line. The non-WIN32 branch already uses std::max, and <algorithm> is included, so this aligns both branches to work in all configurations.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Windows-specific ChangesCodec context frame parsing
Estimated code review effort: 1 (Trivial) | ~2 minutes Mergeability Score: ⚪ Minimal · up to This change fixes Windows builds using NOMINMAX without altering runtime behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The WIN32 branch uses unqualified
max, which only compiles whenwindows.h'smaxmacro is defined. NOMINMAX builds fail on this line. The non-WIN32 branch already usesstd::max, and<algorithm>is included, so this aligns both branches to work in all configurations.Verified:
maxreproduces the error;std::maxcompiles clean.Summary by CodeRabbit