rsc/inc/rscpar.hxx | 4 ++-- rsc/source/parser/rsclex.cxx | 10 +++++----- rsc/source/parser/rscpar.cxx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit 96208fc5983e459a854c8b4a3c3334e4a8904f56 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Mar 24 16:11:55 2017 +0100 This code trades in 'char' entities disguised as 'int' (with EOF represented as 0), so better actually use 'char'. Same as 0a92c29e4747f2289514cdb1030900b7c1cbb6ba "This code trades in 'char' entities disguised as 'int'" in idl. Change-Id: Ie664c1a0cceb7281fae29bdb75d191b998df44cc diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx index 265158ba185c..a299af4a20ed 100644 --- a/rsc/inc/rscpar.hxx +++ b/rsc/inc/rscpar.hxx @@ -60,8 +60,8 @@ public: sal_uInt32 GetLineNo() { return nLineNo; } sal_uInt32 GetScanPos() { return nScanPos; } char * GetLine() { return pLine; } - int GetChar(); - int GetFastChar() + char GetChar(); + char GetFastChar() { return pLine[ nScanPos ] ? pLine[ nScanPos++ ] : GetChar(); diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index e03aa09444d5..37ea1d3b3973 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -50,7 +50,7 @@ const char* StringContainer::putString( const char* pString ) return aInsert.first->getStr(); } -static int c; +static char c; static bool bLastInclude;// true, if last symbol was INCLUDE RscFileInst* pFI; RscTypCont* pTC; @@ -166,7 +166,7 @@ int MakeToken( YYSTYPE * pTokenVal ) c = pFI->GetFastChar(); while( '>' != c && !pFI->IsEof() ) { - aBuf.append( sal_Char(c) ); + aBuf.append( c ); c = pFI->GetFastChar(); } c = pFI->GetFastChar(); @@ -204,10 +204,10 @@ int MakeToken( YYSTYPE * pTokenVal ) aBuf.append( '\\' ); c = pFI->GetFastChar(); if( c ) - aBuf.append( sal_Char(c) ); + aBuf.append( c ); } else - aBuf.append( sal_Char(c) ); + aBuf.append( c ); } pTokenVal->string = const_cast<char*>(pStringContainer->putString( aBuf.getStr() )); return STRING; @@ -226,7 +226,7 @@ int MakeToken( YYSTYPE * pTokenVal ) while( rtl::isAsciiAlphanumeric (static_cast<unsigned char>(c)) || (c == '_') || (c == '-') || (c == ':')) { - aBuf.append( sal_Char(c) ); + aBuf.append( c ); c = pFI->GetFastChar(); } diff --git a/rsc/source/parser/rscpar.cxx b/rsc/source/parser/rscpar.cxx index 4fc1b11f8cdf..352e3422df95 100644 --- a/rsc/source/parser/rscpar.cxx +++ b/rsc/source/parser/rscpar.cxx @@ -57,7 +57,7 @@ RscFileInst::~RscFileInst() rtl_freeMemory( pLine ); } -int RscFileInst::GetChar() +char RscFileInst::GetChar() { if( pLine[ nScanPos ] ) return pLine[ nScanPos++ ]; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits