diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2013-08-01 04:32:32 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2013-08-01 04:33:23 +0900 |
commit | 392c5b2a70440c03341f21c7583ca5139b4a253b (patch) | |
tree | 4d23407c3fef57af8615f592d075bf11bd6bf5bd /basic | |
parent | sidebar: fix widget positioning when replacing controls (diff) | |
download | core-392c5b2a70440c03341f21c7583ca5139b4a253b.tar.gz core-392c5b2a70440c03341f21c7583ca5139b4a253b.zip |
Mark as const
Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/exprgen.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/token.cxx | 10 | ||||
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index 357809757c5a..762e0e38958b 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -28,7 +28,7 @@ typedef struct { SbiOpcode eOp; // Opcode } OpTable; -static OpTable aOpTable [] = { +static const OpTable aOpTable [] = { { EXPON,_EXP }, { MUL, _MUL }, { DIV, _DIV }, @@ -156,7 +156,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode ) { pRight->Gen(); } - for( OpTable* p = aOpTable; p->eTok != NIL; p++ ) + for( const OpTable* p = aOpTable; p->eTok != NIL; p++ ) { if( p->eTok == eTok ) { diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index bb53d93b4b24..d61f33444a7b 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -38,7 +38,7 @@ struct SbiStatement { #define Y sal_True #define N sal_False -static SbiStatement StmntTable [] = { +static const SbiStatement StmntTable [] = { { ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE { CALL, &SbiParser::Call, N, Y, }, // CALL { CLOSE, &SbiParser::Close, N, Y, }, // CLOSE @@ -409,7 +409,7 @@ bool SbiParser::Parse() // statement parsers - SbiStatement* p; + const SbiStatement* p; for( p = StmntTable; p->eTok != NIL; p++ ) if( p->eTok == eCurTok ) break; diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 0da1c51476d9..f3d27eddbcd1 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -25,9 +25,9 @@ struct TokenTable { SbiToken t; const char *s; }; static short nToken; // number of tokens -static TokenTable* pTokTable; +static const TokenTable* pTokTable; -static TokenTable aTokTable_Basic [] = { +static const TokenTable aTokTable_Basic [] = { { CAT, "&" }, { MUL, "*" }, { PLUS, "+" }, @@ -220,7 +220,7 @@ SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb ) bEos = bKeywords = bErrorIsSymbol = true; if( !nToken ) { - TokenTable *tp; + const TokenTable *tp; for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {} } @@ -297,7 +297,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t ) default: break; } - TokenTable* tp = pTokTable; + const TokenTable* tp = pTokTable; for( short i = 0; i < nToken; i++, tp++ ) { if( tp->t == t ) @@ -336,7 +336,7 @@ SbiToken SbiTokenizer::Next() bEos = IsEoln( eCurTok ); return eCurTok; } - TokenTable *tp; + const TokenTable *tp; if( !NextSym() ) { diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 157407ed16d3..180de7ed0ac6 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -288,7 +288,7 @@ SbxError SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingl } -static double roundArray[] = { +static const double roundArray[] = { 5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6, 0.5e-7, 0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,0.5e-15 }; |