Changeset 263280 in webkit
- Timestamp:
- Jun 19, 2020, 12:52:22 PM (6 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
wtf/OptionSet.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r263255 r263280 1 2020-06-19 Michael Catanzaro <mcatanzaro@gnome.org> 2 3 -Wsign-compare in isValidOptionSet 4 https://bugs.webkit.org/show_bug.cgi?id=213383 5 6 Reviewed by Darin Adler. 7 8 The OptionSet's StorageType is always unsigned, even if the enum's underlying value is not. 9 Match this in isValidOptionSet to avoid -Wsign-compare during validity checking. 10 11 * wtf/OptionSet.h: 12 (WTF::isValidOptionSet): 13 1 14 2020-06-19 Myles C. Maxfield <mmaxfield@apple.com> 2 15 -
trunk/Source/WTF/wtf/OptionSet.h
r263208 r263280 254 254 WARN_UNUSED_RETURN constexpr bool isValidOptionSet(OptionSet<E> optionSet) 255 255 { 256 auto allValidBitsValue = OptionSetValueChecker<std:: underlying_type_t<E>, typename EnumTraits<E>::values>::allValidBits();256 auto allValidBitsValue = OptionSetValueChecker<std::make_unsigned_t<std::underlying_type_t<E>>, typename EnumTraits<E>::values>::allValidBits(); 257 257 return (optionSet.toRaw() | allValidBitsValue) == allValidBitsValue; 258 258 }
Note:
See TracChangeset
for help on using the changeset viewer.