About ReadUChar in tools/source/stream/stream.cxx
julien2412
serval2412 at yahoo.fr
Sun Dec 14 03:17:13 PST 2014
Hello,
Investigating on https://bugs.freedesktop.org/show_bug.cgi?id=87248, I
noticed that ReadUChar in tools/source/stream/stream.cxx was, except
parameter function, identical to ReadChar
977 SvStream& SvStream::ReadChar( char& r )
978 {
979 if( (bIoRead || !bIsConsistent) &&
980 sizeof(char) <= nBufFree )
981 {
982 r = *pBufPos;
983 nBufActualPos += sizeof(char);
984 pBufPos += sizeof(char);
985 nBufFree -= sizeof(char);
986 }
987 else
988 Read( (char*)&r, sizeof(char) );
989 return *this;
990 }
991
992 SvStream& SvStream::ReadUChar( unsigned char& r )
993 {
994 if( (bIoRead || !bIsConsistent) &&
995 sizeof(char) <= nBufFree )
996 {
997 r = *pBufPos;
998 nBufActualPos += sizeof(char);
999 pBufPos += sizeof(char);
1000 nBufFree -= sizeof(char);
1001 }
1002 else
1003 Read( (char*)&r, sizeof(char) );
1004 return *this;
1005 }
See
http://opengrok.libreoffice.org/xref/core/tools/source/stream/stream.cxx#977
Should we changed every "sizeof(char)" in ReadUChar by "sizeof(unsigned
char)"?
Julien
--
View this message in context: http://nabble.documentfoundation.org/About-ReadUChar-in-tools-source-stream-stream-cxx-tp4132559.html
Sent from the Dev mailing list archive at Nabble.com.
More information about the LibreOffice
mailing list