Detect SvStream::operator<< calls with bool args w/o using -Wsign-promo
...as -Wsign-promo caused other problems and has been removed again with488823a140
"Remove -Wsign-promo." It had originally been introduced withe8bbb76827
"ensure correct export size type in stream operation," apparently to detect an SvStream::operator<< call with a bool argument that would pick the "int" overload instead of the "unsigned char" (aka sal_Bool) one (which would have happened to trigger the -Wsign-promo warning "by luck," given that sal_Bool is unsigned char and not signed char, say). Change-Id: I0bf4389753e53a535bd90ca2a98b6a5be63d179a Reviewed-on: https://gerrit.libreoffice.org/1798 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
This commit is contained in:
committed by
Luboš Luňák
parent
b9c21b972e
commit
aab9c9deee
@@ -324,6 +324,8 @@ public:
|
||||
SvStream& operator<<( sal_Int32 nInt32 );
|
||||
SvStream& operator<<( sal_Int64 nInt64 );
|
||||
|
||||
SvStream& operator<<( bool b )
|
||||
{ return operator<<(static_cast< sal_Bool >(b)); }
|
||||
SvStream& operator<<( signed char nChar );
|
||||
SvStream& operator<<( char nChar );
|
||||
SvStream& operator<<( unsigned char nChar );
|
||||
|
Reference in New Issue
Block a user