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 /sw/inc/pam.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 'sw/inc/pam.hxx')
-rw-r--r-- | sw/inc/pam.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 957f9673b18f..c090b3f0dfae 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -216,7 +216,7 @@ public: { /** clear the mark position; this helps if mark's SwIndex is registered at some node, and that node is then deleted */ - *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) ); + *m_pMark = SwPosition( SwNodeIndex( GetNode().GetNodes() ) ); m_pMark = m_pPoint; } } @@ -256,15 +256,15 @@ public: { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; } /// @return current Node at Point/Mark - SwNode * GetNode ( bool bPoint = true ) const + SwNode & GetNode ( bool bPoint = true ) const { - return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode(); + return ( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode(); } /// @return current ContentNode at Point/Mark SwCntntNode* GetCntntNode( bool bPoint = true ) const { - return GetNode(bPoint)->GetCntntNode(); + return GetNode(bPoint).GetCntntNode(); } /** |