Skip to content

Stop translating BOOL to bool#363

Merged
AArnott merged 2 commits into
mainfrom
fix362
Aug 17, 2021
Merged

Stop translating BOOL to bool#363
AArnott merged 2 commits into
mainfrom
fix362

Conversation

@AArnott

@AArnott AArnott commented Aug 17, 2021

Copy link
Copy Markdown
Member

Fixes #362

@AArnott AArnott enabled auto-merge August 17, 2021 19:31
@AArnott AArnott merged commit 5372de3 into main Aug 17, 2021
@AArnott AArnott deleted the fix362 branch August 17, 2021 20:05
@sylveon

sylveon commented Aug 17, 2021

Copy link
Copy Markdown

I'd personally not add the implicit conversion operator, as it encourages the while (GetMessage(...)) kind of code, which is explicitly pointed out as wrong in the docs for GetMessage. Or maybe this special case is something an analyzer could handle.

@jnm2

jnm2 commented Aug 17, 2021

Copy link
Copy Markdown
Contributor

That would hurt usability of all APIs that use BOOL for the sake of one or two that are this way, right?

@sylveon

sylveon commented Aug 17, 2021

Copy link
Copy Markdown

That's why I suggested adding an analyzer instead, that would warn for such usages.

@AArnott

AArnott commented Aug 17, 2021

Copy link
Copy Markdown
Member Author

I imagine analyzers could be a huge win for users. But also a bottomless pit of work. If folks are interested in sending PRs that add analyzers, I will try to find time to add the first one as a template for how more can be added.

@AArnott AArnott linked an issue Aug 18, 2021 that may be closed by this pull request
@AArnott AArnott linked an issue Aug 18, 2021 that may be closed by this pull request
AArnott added a commit that referenced this pull request Sep 5, 2025
Fix unofficial build with SDL tools enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants