From b44cbb26efe1d0b0950b1e1613e131b506dc3876 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Jan 2015 12:38:10 +0200 Subject: new loplugin: change virtual methods to non-virtual Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae --- l10ntools/source/po.cxx | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'l10ntools/source') diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index a4e60b91e6a6..c2acc2e25e8a 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -52,41 +52,36 @@ public: virtual ~GenPoEntry(); // Default copy constructor and copy operator work well - virtual OString getExtractCom() const { return m_sExtractCom; } - virtual OString getReference() const { return m_sReference; } - virtual OString getMsgCtxt() const { return m_sMsgCtxt; } - virtual OString getMsgId() const { return m_sMsgId; } - virtual OString getMsgStr() const { return m_sMsgStr; } - virtual bool isFuzzy() const { return m_bFuzzy; } - virtual bool isNull() const { return m_bNull; } - - virtual void setExtractCom(const OString& rExtractCom) + OString getReference() const { return m_sReference; } + OString getMsgCtxt() const { return m_sMsgCtxt; } + OString getMsgId() const { return m_sMsgId; } + OString getMsgStr() const { return m_sMsgStr; } + bool isFuzzy() const { return m_bFuzzy; } + bool isNull() const { return m_bNull; } + + void setExtractCom(const OString& rExtractCom) { m_sExtractCom = rExtractCom; } - virtual void setReference(const OString& rReference) + void setReference(const OString& rReference) { m_sReference = rReference; } - virtual void setMsgCtxt(const OString& rMsgCtxt) + void setMsgCtxt(const OString& rMsgCtxt) { m_sMsgCtxt = rMsgCtxt; } - virtual void setMsgId(const OString& rMsgId) + void setMsgId(const OString& rMsgId) { m_sMsgId = rMsgId; } - virtual void setMsgStr(const OString& rMsgStr) + void setMsgStr(const OString& rMsgStr) { m_sMsgStr = rMsgStr; } - virtual void setFuzzy(const bool bFuzzy) - { - m_bFuzzy = bFuzzy; - } - virtual void writeToFile(std::ofstream& rOFStream) const; - virtual void readFromFile(std::ifstream& rIFStream); + void writeToFile(std::ofstream& rOFStream) const; + void readFromFile(std::ifstream& rIFStream); }; namespace -- cgit