Mark as const
Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7
This commit is contained in:
@@ -40,7 +40,7 @@ using namespace animcore;
|
||||
0, 0\
|
||||
}\
|
||||
|
||||
static struct ImplementationEntry g_entries[] =
|
||||
static const struct ImplementationEntry g_entries[] =
|
||||
{
|
||||
IMPLEMENTATION_ENTRY( PAR ),
|
||||
IMPLEMENTATION_ENTRY( SEQ ),
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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() )
|
||||
{
|
||||
|
@@ -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 };
|
||||
|
||||
|
@@ -6198,9 +6198,9 @@ namespace osl_Directory
|
||||
#ifdef WNT
|
||||
|
||||
//##########################################
|
||||
char* get_unused_drive_letter()
|
||||
const char* get_unused_drive_letter()
|
||||
{
|
||||
static char m_aBuff[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
static const char m_aBuff[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
DWORD ld = GetLogicalDrives();
|
||||
DWORD i = 4;
|
||||
@@ -6218,7 +6218,7 @@ namespace osl_Directory
|
||||
//##########################################
|
||||
void at_invalid_logical_drive()
|
||||
{
|
||||
char* drv = get_unused_drive_letter();
|
||||
const char* drv = get_unused_drive_letter();
|
||||
char buff[PATH_BUFFER_SIZE];
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
||||
|
@@ -1331,7 +1331,7 @@ static bool lcl_isLeapYear(const sal_uInt32 nYear)
|
||||
static sal_uInt16
|
||||
lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const sal_Int32 nYear)
|
||||
{
|
||||
static sal_uInt16 s_MaxDaysPerMonth[12] =
|
||||
static const sal_uInt16 s_MaxDaysPerMonth[12] =
|
||||
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
OSL_ASSERT(0 < nMonth && nMonth <= 12);
|
||||
if ((2 == nMonth) && lcl_isLeapYear(nYear))
|
||||
|
@@ -77,7 +77,7 @@ IFrameWindow_Impl::IFrameWindow_Impl( Window *pParent, sal_Bool bHasBorder, WinB
|
||||
|
||||
const SfxItemPropertyMapEntry* lcl_GetIFramePropertyMap_Impl()
|
||||
{
|
||||
static SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] =
|
||||
static const SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] =
|
||||
{
|
||||
{ MAP_CHAR_LEN("FrameIsAutoBorder"), WID_FRAME_IS_AUTO_BORDER, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
|
||||
{ MAP_CHAR_LEN("FrameIsAutoScroll"), WID_FRAME_IS_AUTO_SCROLL, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
|
||||
|
@@ -60,7 +60,7 @@ void PluginWindow_Impl::Resize()
|
||||
#define WID_URL 3
|
||||
const SfxItemPropertyMapEntry* lcl_GetPluginPropertyMap_Impl()
|
||||
{
|
||||
static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
|
||||
static const SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
|
||||
{
|
||||
{ MAP_CHAR_LEN("PluginCommands"), WID_COMMANDS, &::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0},
|
||||
{ MAP_CHAR_LEN("PluginMimeType"), WID_MIMETYPE, &::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 },
|
||||
|
@@ -361,7 +361,7 @@ const char* GetWindowClassification (const Window* pWindow)
|
||||
}
|
||||
else
|
||||
{
|
||||
static char msWindow[] = "window";
|
||||
static const char msWindow[] = "window";
|
||||
return msWindow;
|
||||
}
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@ extern sdecl::ServiceDecl const serviceDecl;
|
||||
|
||||
namespace
|
||||
{
|
||||
static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
|
||||
static const struct ::cppu::ImplementationEntry s_aServiceEntries[] =
|
||||
{
|
||||
{
|
||||
::svt::uno::Wizard::Create,
|
||||
|
Reference in New Issue
Block a user