Repository navigation
CandidateWindow: parenthesize std::max so it builds with windows.h - #14
Open
DaveTseng2019 wants to merge 1 commit into
Open
DaveTseng2019 wants to merge 1 commit into
DaveTseng2019 wants to merge 1 commit into
Conversation
a0eeea4 added std::max(1, candPerRow_) in itemRect(). windows.h defines a max() macro and NOMINMAX is not set, so the macro expands and MSVC stops with C2589 ("'(': illegal token on right side of '::'"). Writing (std::max)(...) keeps the macro from expanding. PIME master still pins libIME2 at 78e6104, so PIME CI does not build this commit yet; the next submodule bump would fail the same way. Verified by building PIME (x86/x64, VS 2026) with this libIME2 and running ctest (4/4 passed). Fully generated by Claude Code (Claude Opus 5.5) without human intervention. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a0eeea4 (#13) added
std::max(1, candPerRow_)inCandidateWindow::itemRect().windows.hdefines amax()macro andNOMINMAXis not set, so the macro expands and MSVC fails with:Writing
(std::max)(...)keeps the macro from expanding. One line, no behavior change.PIME master still pins libIME2 at 78e6104, so PIME CI has not built this commit yet; the next submodule bump would fail the same way.
Tested: built PIME (x86/x64, Visual Studio 2026) with this libIME2, ran
ctest(4/4 passed), and installed it locally; typing with Chewing works.Fully generated by Claude Code (Claude Opus 5.5) without human intervention.
🤖 Generated with Claude Code