Forked from
ogs / ogs
Source project has a limited visibility.
-
Dmitri Naumov authored
From llvm documentation https://clang.llvm.org/extra/clang-tidy/checks/misc-string-compare.html "A common mistake is to use the string’s compare method instead of using the equality or inequality operators. The compare method is intended for sorting functions and thus returns a negative number, a positive number or zero depending on the lexicographical relationship between the strings compared. If an equality or inequality check can suffice, that is recommended. This is recommended to avoid the risk of incorrect interpretation of the return value and to simplify the code. The string equality and inequality operators can also be faster than the compare method due to early termination."
Dmitri Naumov authoredFrom llvm documentation https://clang.llvm.org/extra/clang-tidy/checks/misc-string-compare.html "A common mistake is to use the string’s compare method instead of using the equality or inequality operators. The compare method is intended for sorting functions and thus returns a negative number, a positive number or zero depending on the lexicographical relationship between the strings compared. If an equality or inequality check can suffice, that is recommended. This is recommended to avoid the risk of incorrect interpretation of the return value and to simplify the code. The string equality and inequality operators can also be faster than the compare method due to early termination."
Code owners
Assign users and groups as approvers for specific file changes. Learn more.