Next runtime messages to be ommitted if compiled with clang using flag '-fsanitize'.

Prevent the return of impossible values for 'enum flags'.
For instance the result of '~Update::Force' at src/BufferView.cpp:3025 without this patch
is '4294967293'.
This commit is contained in:
Kornel Benko 2022-01-23 20:13:26 +01:00
parent ec3a44fef5
commit f8f86a1a81

View File

@ -46,7 +46,7 @@ inline flags operator&(flags const f, flags const g)
inline flags operator~(flags const f)
{
return static_cast<flags>(~int(f));
return static_cast<flags>(~int(f) & 0x3f);
}
} // namespace Update