Skip to content

Commit

Permalink
Simplify a conditional in order to avoid a warning under MSVC
Browse files Browse the repository at this point in the history
We were using some convoluted logic here to check if the result of a
`bool` returning function was false, causing MSVC to give a warning
about "'>': unsafe use of type 'bool' in operation". This just removes
the greater-than comparison of the bool against zero.
  • Loading branch information
bogner committed Aug 16, 2023
1 parent 6f4a0c7 commit 314a5d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ void SymbolGraphSerializer::visitObjCCategoryRecord(
return;

// Check if the current Category' parent has been visited before, if so skip.
if (!(visitedCategories.contains(Record.Interface.Name) > 0)) {
if (!visitedCategories.contains(Record.Interface.Name)) {
visitedCategories.insert(Record.Interface.Name);
Object Obj;
serializeObject(Obj, "identifier",
Expand Down

0 comments on commit 314a5d7

Please sign in to comment.