Skip to content

Commit 314a5d7

Browse files
committed
Simplify a conditional in order to avoid a warning under MSVC
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.
1 parent 6f4a0c7 commit 314a5d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ void SymbolGraphSerializer::visitObjCCategoryRecord(
839839
return;
840840

841841
// Check if the current Category' parent has been visited before, if so skip.
842-
if (!(visitedCategories.contains(Record.Interface.Name) > 0)) {
842+
if (!visitedCategories.contains(Record.Interface.Name)) {
843843
visitedCategories.insert(Record.Interface.Name);
844844
Object Obj;
845845
serializeObject(Obj, "identifier",

0 commit comments

Comments
 (0)