Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


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.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.