summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-24 16:11:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-24 16:13:39 +0100
commit96208fc5983e459a854c8b4a3c3334e4a8904f56 (patch)
tree85b5b9d8de36d49632f58913f6baa081ce5f9506 /rsc
parent3691457e9abde8af74db9c3b85e5494b2f9d7840 (diff)
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
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscpar.hxx4
-rw-r--r--rsc/source/parser/rsclex.cxx10
-rw-r--r--rsc/source/parser/rscpar.cxx2
3 files changed, 8 insertions, 8 deletions
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++ ];