diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-18 12:14:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-24 11:34:21 +0200 |
commit | e2080e70fe8b085f18e868e46340454720fa94ca (patch) | |
tree | 4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /lotuswordpro/source/filter/lwpholder.hxx | |
parent | Translated German comments - correction (diff) | |
download | core-e2080e70fe8b085f18e868e46340454720fa94ca.tar.gz core-e2080e70fe8b085f18e868e46340454720fa94ca.zip |
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'lotuswordpro/source/filter/lwpholder.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpholder.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpholder.hxx b/lotuswordpro/source/filter/lwpholder.hxx index 6f52ffc4c203..b1f061187d76 100644 --- a/lotuswordpro/source/filter/lwpholder.hxx +++ b/lotuswordpro/source/filter/lwpholder.hxx @@ -76,7 +76,7 @@ class LwpDLVListHeadHolder : public LwpObject public: LwpDLVListHeadHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); void Read() SAL_OVERRIDE; - LwpObjectID* GetHeadID() { return &m_DLVHead;} + LwpObjectID& GetHeadID() { return m_DLVHead;} private: virtual ~LwpDLVListHeadHolder(){} @@ -91,8 +91,8 @@ class LwpDLVListHeadTailHolder : public LwpObject public: LwpDLVListHeadTailHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); void Read() SAL_OVERRIDE; - LwpObjectID* GetHead(){ return m_HeadTail.GetHead();} - LwpObjectID* GetTail(){ return m_HeadTail.GetTail();} + LwpObjectID& GetHead(){ return m_HeadTail.GetHead();} + LwpObjectID& GetTail(){ return m_HeadTail.GetTail();} protected: LwpDLVListHeadTail m_HeadTail; private: @@ -107,7 +107,7 @@ class LwpObjectHolder : public LwpDLVList public: LwpObjectHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); void Read() SAL_OVERRIDE; - LwpObjectID* GetObject(){return &m_Object;} + LwpObjectID& GetObject() { return m_Object; } protected: virtual ~LwpObjectHolder(){} @@ -123,8 +123,8 @@ class LwpListList : public LwpObjectHolder public: LwpListList(LwpObjectHeader& objHdr, LwpSvStream* pStrm); void Read() SAL_OVERRIDE; - LwpObjectID* GetHead(){ return m_HeadTail.GetHead();} - LwpObjectID* GetTail(){ return m_HeadTail.GetTail();} + LwpObjectID& GetHead(){ return m_HeadTail.GetHead();} + LwpObjectID& GetTail(){ return m_HeadTail.GetTail();} protected: LwpDLVListHeadTail m_HeadTail; private: |