Kaydet (Commit) 43d633d7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Try silence cid#1371124 ("Operands don't affect result")

...where Coverity doesn't reveal which instantiation of the templated code it is
complaining about, but it must be ScRefFlags (sc/inc/address.hxx), which has
underlying type sal_uInt16 and a mask of 0xFFFF.

Change-Id: If0abd195885acdffb3c61cdab88d7a2c87c00c4f
üst d53bb5c0
......@@ -79,7 +79,11 @@ struct is_typed_flags {
{
#if !HAVE_CXX11_CONSTEXPR || HAVE_CXX14_CONSTEXPR
assert(detail::isNonNegative(value));
assert((value & ~M) == 0);
assert(
static_cast<typename std::underlying_type<E>::type>(~M) == 0
// avoid "operands don't affect result" warnings when M
// covers all bits of the underlying type
|| (value & ~M) == 0);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment