diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-14 10:20:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-14 10:24:47 +0200 |
commit | b8eb2946511ce617323b13dffe2b1d9704e0be60 (patch) | |
tree | d5aa4f91e75d654a1cdfcd75f26dd4b813a73ff7 /l10ntools | |
parent | d8644c8edb405abd9d71e62e43e898c1d2a28fd2 (diff) |
loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/inc/xmlparse.hxx | 16 | ||||
-rw-r--r-- | l10ntools/inc/xrmmerge.hxx | 2 | ||||
-rw-r--r-- | l10ntools/source/po.cxx | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index 54bba22b8eaa..7b0daae041e0 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -62,8 +62,8 @@ public: ) : m_sName( rName ), m_sValue( rValue ) {} - OString GetName() const { return m_sName; } - OString GetValue() const { return m_sValue; } + const OString& GetName() const { return m_sName; } + const OString& GetValue() const { return m_sValue; } void setValue( const OString &rValue ){ m_sValue = rValue; } }; @@ -171,7 +171,7 @@ public: virtual XMLNodeType GetNodeType() const override { return XMLNodeType::XFILE; } /// returns file name - OString GetName() const { return m_sFileName; } + const OString& GetName() const { return m_sFileName; } void SetName( const OString &rFilename ) { m_sFileName = rFilename; } const std::vector<OString>& getOrder() const { return m_vOrder; } @@ -229,7 +229,7 @@ public: virtual XMLNodeType GetNodeType() const override { return XMLNodeType::ELEMENT; } /// returns element name - OString GetName() const { return m_sElementName; } + const OString& GetName() const { return m_sElementName; } /// returns list of attributes of this element XMLAttributeList *GetAttributeList() { return m_pAttributes.get(); } @@ -247,7 +247,7 @@ public: void SetPos ( int nPos ) { m_nPos = nPos; } void SetOldRef ( OString const & sOldRef ) { m_sOldRef = sOldRef; } - OString GetOldref() const { return m_sOldRef; } + const OString& GetOldref() const { return m_sOldRef; } }; /** Holds character data @@ -270,7 +270,7 @@ public: virtual XMLNodeType GetNodeType() const override { return XMLNodeType::DATA; } /// returns the data - OString GetData() const { return m_sData; } + const OString& GetData() const { return m_sData; } /// adds new character data to the existing one void AddData( const OString &rData ) { m_sData += rData; } @@ -296,7 +296,7 @@ public: virtual XMLNodeType GetNodeType() const override { return XMLNodeType::COMMENT; } /// returns the comment - OString GetComment() const { return m_sComment; } + const OString& GetComment() const { return m_sComment; } }; /** Holds additional file content like those for which no handler exists @@ -319,7 +319,7 @@ public: virtual XMLNodeType GetNodeType() const override { return XMLNodeType::DEFAULT; } /// returns the comment - OString GetDefault() const { return m_sDefault; } + const OString& GetDefault() const { return m_sDefault; } }; /** struct for error information, used by class SimpleXMLParser diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx index 45b3e2f6efe5..764629963c7e 100644 --- a/l10ntools/inc/xrmmerge.hxx +++ b/l10ntools/inc/xrmmerge.hxx @@ -55,7 +55,7 @@ protected: const OString &rCloseTag )=0; - OString GetGID() { return sGID; } + const OString& GetGID() { return sGID; } public: XRMResParser(); diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 7881be384ebf..176ce1d813b1 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -49,10 +49,10 @@ public: virtual ~GenPoEntry(); // Default copy constructor and copy operator work well - OString getReference() const { return m_sReference; } - OString getMsgCtxt() const { return m_sMsgCtxt; } - OString getMsgId() const { return m_sMsgId; } - OString getMsgStr() const { return m_sMsgStr; } + const OString& getReference() const { return m_sReference; } + const OString& getMsgCtxt() const { return m_sMsgCtxt; } + const OString& getMsgId() const { return m_sMsgId; } + const OString& getMsgStr() const { return m_sMsgStr; } bool isFuzzy() const { return m_bFuzzy; } bool isNull() const { return m_bNull; } |