summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-18 11:33:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-18 13:27:45 +0200
commit41dc56df37596ff20c0476ae44fbd07b8b4678a1 (patch)
tree944bcf4a9f458e4ad1025651b7ac632e2d47c0dd
parentloplugin:constparams in package (diff)
downloadcore-41dc56df37596ff20c0476ae44fbd07b8b4678a1.tar.gz
core-41dc56df37596ff20c0476ae44fbd07b8b4678a1.zip
loplugin:constparams codemaker,idl,idlc
Change-Id: Ic72b7525cfbfbd3c5afb12fe9ea814176e6c8c9d Reviewed-on: https://gerrit.libreoffice.org/40126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--codemaker/source/codemaker/global.cxx4
-rw-r--r--idl/inc/bastype.hxx6
-rw-r--r--idl/inc/database.hxx2
-rw-r--r--idl/inc/lex.hxx2
-rw-r--r--idl/inc/parser.hxx8
-rw-r--r--idl/inc/types.hxx2
-rw-r--r--idl/source/objects/bastype.cxx6
-rw-r--r--idl/source/objects/slot.cxx2
-rw-r--r--idl/source/objects/types.cxx2
-rw-r--r--idl/source/prj/database.cxx2
-rw-r--r--idl/source/prj/parser.cxx8
-rw-r--r--idlc/inc/astscope.hxx2
-rw-r--r--idlc/inc/errorhandler.hxx6
-rw-r--r--idlc/inc/fehelper.hxx2
-rw-r--r--idlc/source/astscope.cxx2
-rw-r--r--idlc/source/errorhandler.cxx8
-rw-r--r--idlc/source/fehelper.cxx2
-rw-r--r--idlc/source/parser.y2
-rw-r--r--include/codemaker/global.hxx4
19 files changed, 36 insertions, 36 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 49ce44be7908..46d5a07e35a6 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -345,7 +345,7 @@ FileStream &operator<<(FileStream& o, char const * s) {
osl_writeFile(o.m_file, s, strlen(s), &writtenBytes);
return o;
}
-FileStream &operator<<(FileStream& o, ::rtl::OString* s) {
+FileStream &operator<<(FileStream& o, ::rtl::OString const * s) {
sal_uInt64 writtenBytes;
osl_writeFile(o.m_file, s->getStr(), s->getLength() * sizeof(sal_Char), &writtenBytes);
return o;
@@ -356,7 +356,7 @@ FileStream &operator<<(FileStream& o, const ::rtl::OString& s) {
return o;
}
-FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer* s) {
+FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer const * s) {
sal_uInt64 writtenBytes;
osl_writeFile(o.m_file, s->getStr(), s->getLength() * sizeof(sal_Char), &writtenBytes);
return o;
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index df04891384e8..de659276472a 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -41,7 +41,7 @@ public:
operator bool() const { return bVal; }
bool IsSet() const { return bSet; }
- bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+ bool ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm );
};
@@ -56,7 +56,7 @@ public:
void setString(const OString& rStr) { m_aStr = rStr; }
const OString& getString() const { return m_aStr; }
- bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
+ bool ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm );
bool IsSet() const
{
return !m_aStr.isEmpty() || nValue != 0;
@@ -68,7 +68,7 @@ public:
};
-bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aString );
+bool ReadStringSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm, OString& aString );
#endif // INCLUDED_IDL_INC_BASTYPE_HXX
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 4444110b6172..7994aa51463a 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -114,7 +114,7 @@ public:
void Write(const OString& rText);
void WriteError( SvTokenStream & rInStm );
- void SetError( const OString& rError, SvToken& rTok );
+ void SetError( const OString& rError, SvToken const & rTok );
void SetAndWriteError( SvTokenStream & rInStm, const OString& rError );
void Push( SvMetaObject * pObj );
sal_uInt32 GetUniqueId() { return ++nUniqueId; }
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index 8a71349971c5..4fa4ff2be648 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -85,7 +85,7 @@ public:
void SetHash( SvStringHashEntry * pHashP )
{ pHash = pHashP; nType = SVTOKENTYPE::HashId; }
- bool Is( SvStringHashEntry * pEntry ) const
+ bool Is( SvStringHashEntry const * pEntry ) const
{ return IsIdentifierHash() && pHash == pEntry; }
};
diff --git a/idl/inc/parser.hxx b/idl/inc/parser.hxx
index cc2696b1e7c7..811908f073e8 100644
--- a/idl/inc/parser.hxx
+++ b/idl/inc/parser.hxx
@@ -56,15 +56,15 @@ public:
SvMetaClass* ReadKnownClass();
SvMetaType* ReadKnownType();
void Read(char cChar);
- bool ReadIfBoolAttribute( SvBOOL&, SvStringHashEntry* pName);
- bool ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry* pName );
+ bool ReadIfBoolAttribute( SvBOOL&, SvStringHashEntry const * pName);
+ bool ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName );
bool ReadIf(char cChar);
void ReadDelimiter();
bool ReadIfDelimiter();
OString ReadIdentifier();
OString ReadString();
- void Read(SvStringHashEntry*);
- bool ReadIf(SvStringHashEntry*);
+ void Read(SvStringHashEntry const *);
+ bool ReadIf(SvStringHashEntry const *);
};
#endif // INCLUDED_IDL_INC_PARSER_HXX
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 8c2bc8b9cf33..fa0c2bb11730 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -55,7 +55,7 @@ class SvMetaType : public SvMetaReference
MetaTypeType nType;
bool bIsItem;
- void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase,
+ void WriteSfxItem( const OString& rItemName, SvIdlDataBase const & rBase,
SvStream & rOutStm );
protected:
bool ReadHeaderSvIdl( SvTokenStream & rInStm );
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index e90ff84e1678..5a34b1c381ea 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -26,7 +26,7 @@
#include <database.hxx>
#include <tools/stream.hxx>
-bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
+bool SvBOOL::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
SvToken& rTok = rInStm.GetToken_Next();
@@ -49,7 +49,7 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
return false;
}
-bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
+bool SvIdentifier::ReadSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
SvToken& rTok = rInStm.GetToken_Next();
@@ -94,7 +94,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
rInStm.Seek( nTokPos );
}
-bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aRetString )
+bool ReadStringSvIdl( SvStringHashEntry const * pName, SvTokenStream & rInStm, OString& aRetString )
{
sal_uInt32 nTokPos = rInStm.Tell();
SvToken& rTok = rInStm.GetToken_Next();
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 20ebd4c5d4c9..ba67221f229d 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -348,7 +348,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList)
}
-static OString MakeSlotName( SvStringHashEntry * pEntry )
+static OString MakeSlotName( SvStringHashEntry const * pEntry )
{
return "SfxSlotMode::" + pEntry->GetName().toAsciiUpperCase();
};
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index f90145f7cd56..3dbe7ecd9825 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -218,7 +218,7 @@ sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
}
void SvMetaType::WriteSfxItem(
- const OString& rItemName, SvIdlDataBase& rBase, SvStream& rOutStm )
+ const OString& rItemName, SvIdlDataBase const & rBase, SvStream& rOutStm )
{
WriteStars( rOutStm );
OString aVarName = " a" + rItemName + "_Impl";
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 5ecace5416ea..1a1057e797f2 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -85,7 +85,7 @@ SvRefMemberList<SvMetaType *>& SvIdlDataBase::GetTypeList()
return aTypeList;
}
-void SvIdlDataBase::SetError( const OString& rError, SvToken& rTok )
+void SvIdlDataBase::SetError( const OString& rError, SvToken const & rTok )
{
if( rTok.GetLine() > 10000 )
aError.SetText( "line count overflow" );
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx
index 2688d2d24938..5701f4f93cd0 100644
--- a/idl/source/prj/parser.cxx
+++ b/idl/source/prj/parser.cxx
@@ -476,7 +476,7 @@ SvMetaType * SvIdlParser::ReadKnownType()
throw SvParseException( rInStm, "wrong typedef: ");
}
-bool SvIdlParser::ReadIfBoolAttribute( SvBOOL& rBool, SvStringHashEntry * pName )
+bool SvIdlParser::ReadIfBoolAttribute( SvBOOL& rBool, SvStringHashEntry const * pName )
{
sal_uInt32 nTokPos = rInStm.Tell();
SvToken& rTok = rInStm.GetToken_Next();
@@ -499,7 +499,7 @@ bool SvIdlParser::ReadIfBoolAttribute( SvBOOL& rBool, SvStringHashEntry * pName
return false;
}
-bool SvIdlParser::ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry * pName )
+bool SvIdlParser::ReadIfIdAttribute( SvIdentifier& rIdentifier, SvStringHashEntry const * pName )
{
sal_uInt32 nTokPos = rInStm.Tell();
SvToken& rTok = rInStm.GetToken_Next();
@@ -572,14 +572,14 @@ bool SvIdlParser::ReadIf(char cChar)
return false;
}
-void SvIdlParser::Read(SvStringHashEntry* entry)
+void SvIdlParser::Read(SvStringHashEntry const * entry)
{
if( !rInStm.GetToken().Is(entry) )
throw SvParseException("expected " + entry->GetName(), rInStm.GetToken());
rInStm.GetToken_Next();
}
-bool SvIdlParser::ReadIf(SvStringHashEntry* entry)
+bool SvIdlParser::ReadIf(SvStringHashEntry const * entry)
{
if( rInStm.GetToken().Is(entry) )
{
diff --git a/idlc/inc/astscope.hxx b/idlc/inc/astscope.hxx
index e241f49407b9..3ce546a087ac 100644
--- a/idlc/inc/astscope.hxx
+++ b/idlc/inc/astscope.hxx
@@ -54,7 +54,7 @@ public:
// Look up a predefined type by its ExprType
AstDeclaration* lookupPrimitiveType(ExprType type);
- AstDeclaration* lookupForAdd(AstDeclaration* pDecl);
+ AstDeclaration* lookupForAdd(AstDeclaration const * pDecl);
protected:
AstDeclaration const * getLast() const
diff --git a/idlc/inc/errorhandler.hxx b/idlc/inc/errorhandler.hxx
index f906ff7395e7..b2d8b94d8c5c 100644
--- a/idlc/inc/errorhandler.hxx
+++ b/idlc/inc/errorhandler.hxx
@@ -80,7 +80,7 @@ public:
static void error1(ErrorCode e, AstDeclaration const * d);
static void error2(
ErrorCode e, AstDeclaration const * d1, AstDeclaration const * d2);
- static void error3(ErrorCode e, AstDeclaration* d1, AstDeclaration* d2, AstDeclaration* d3);
+ static void error3(ErrorCode e, AstDeclaration const * d1, AstDeclaration const * d2, AstDeclaration const * d3);
// Warning
static void warning0(WarningCode e, const sal_Char* warningmsg);
@@ -100,13 +100,13 @@ public:
// Report a type error
static void noTypeError(AstDeclaration const * pDecl);
- static void inheritanceError(NodeType nodeType, const OString* name, AstDeclaration* pDecl);
+ static void inheritanceError(NodeType nodeType, const OString* name, AstDeclaration const * pDecl);
static void flagError(ErrorCode e, sal_uInt32 flag);
static void forwardLookupError(const AstDeclaration* pForward, const OString& name);
- static void constantExpected(AstDeclaration* pDecl, const OString& name);
+ static void constantExpected(AstDeclaration const * pDecl, const OString& name);
static void evalError(AstExpression* pExpr);
diff --git a/idlc/inc/fehelper.hxx b/idlc/inc/fehelper.hxx
index 9cec2f644e25..730aa05607a1 100644
--- a/idlc/inc/fehelper.hxx
+++ b/idlc/inc/fehelper.hxx
@@ -63,7 +63,7 @@ public:
{ return m_typeParameters; }
private:
- void initializeInherits(OString* pinherits);
+ void initializeInherits(OString const * pinherits);
NodeType m_nodeType;
OString* m_pName;
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index c999257e1eba..c90870ebeeff 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -319,7 +319,7 @@ AstDeclaration* AstScope::lookupPrimitiveType(ExprType type)
return nullptr;
}
-AstDeclaration* AstScope::lookupForAdd(AstDeclaration* pDecl)
+AstDeclaration* AstScope::lookupForAdd(AstDeclaration const * pDecl)
{
if ( !pDecl )
return nullptr;
diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx
index ac3aeee77b8e..53339318ec91 100644
--- a/idlc/source/errorhandler.cxx
+++ b/idlc/source/errorhandler.cxx
@@ -444,7 +444,7 @@ void ErrorHandler::error2(
idlc()->incErrorCount();
}
-void ErrorHandler::error3(ErrorCode e, AstDeclaration* d1, AstDeclaration* d2, AstDeclaration* d3)
+void ErrorHandler::error3(ErrorCode e, AstDeclaration const * d1, AstDeclaration const * d2, AstDeclaration const * d3)
{
errorHeader(e);
fprintf(stderr, "'%s', '%s', '%s'\n", d1->getScopedName().getStr(),
@@ -528,11 +528,11 @@ char const * nodeTypeName(NodeType nodeType) {
}
-void ErrorHandler::inheritanceError(NodeType nodeType, const OString* name, AstDeclaration* pDecl)
+void ErrorHandler::inheritanceError(NodeType nodeType, const OString* name, AstDeclaration const * pDecl)
{
if ( nodeType == NT_interface &&
(pDecl->getNodeType() == NT_interface) &&
- !(static_cast<AstInterface*>(pDecl)->isDefined()) )
+ !(static_cast<AstInterface const *>(pDecl)->isDefined()) )
{
errorHeader(ErrorCode::CannotInheritFromForward);
fprintf(stderr, "interface '%s' cannot inherit from forward declared interface '%s'\n",
@@ -556,7 +556,7 @@ void ErrorHandler::forwardLookupError(const AstDeclaration* pForward,
idlc()->incErrorCount();
}
-void ErrorHandler::constantExpected(AstDeclaration* pDecl,
+void ErrorHandler::constantExpected(AstDeclaration const * pDecl,
const OString& name)
{
errorHeader(ErrorCode::ExpectedConstant);
diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx
index 47cb63af32bd..1d3fc4154b1b 100644
--- a/idlc/source/fehelper.cxx
+++ b/idlc/source/fehelper.cxx
@@ -70,7 +70,7 @@ FeInheritanceHeader::FeInheritanceHeader(
initializeInherits(pInherits);
}
-void FeInheritanceHeader::initializeInherits(OString* pInherits)
+void FeInheritanceHeader::initializeInherits(OString const * pInherits)
{
if ( pInherits )
{
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index d7f63a55f152..af945f67a4c2 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -66,7 +66,7 @@ using ::rtl::OStringBuffer;
extern int yylex(void);
void yyerror(char const *);
-void checkIdentifier(::rtl::OString* id)
+void checkIdentifier(::rtl::OString const * id)
{
static short check = 0;
if (check == 0) {
diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx
index f17141178139..02c9fed777e3 100644
--- a/include/codemaker/global.hxx
+++ b/include/codemaker/global.hxx
@@ -55,9 +55,9 @@ public:
// friend functions
friend FileStream &operator<<(FileStream& o, sal_uInt32 i);
friend FileStream &operator<<(FileStream& o, char const * s);
- friend FileStream &operator<<(FileStream& o, ::rtl::OString* s);
+ friend FileStream &operator<<(FileStream& o, ::rtl::OString const * s);
friend FileStream &operator<<(FileStream& o, const ::rtl::OString& s);
- friend FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer* s);
+ friend FileStream &operator<<(FileStream& o, ::rtl::OStringBuffer const * s);
friend FileStream &operator<<(FileStream& o, const ::rtl::OStringBuffer& s);
friend FileStream & operator <<(FileStream & out, rtl::OUString const & s);