diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-29 20:50:43 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-30 09:46:21 +0200 |
commit | 55dfe2c12e450a90cbc05f9ec53f1ed6508d8de9 (patch) | |
tree | 1a312462989f3a521b3471225443ac229db4e7b6 /sw/inc/pam.hxx | |
parent | ac94aa6f7d2a8e41e7260ba740813cdbbdd6a2ae (diff) |
SwNode::GetDoc can return a reference instead
and remove discovered redundant null checks
Change-Id: I6b8bc9593434f38947e399a48888a8fa0d4f7e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103640
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/pam.hxx')
-rw-r--r-- | sw/inc/pam.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index f94c796d1bfb..6c87f3559b78 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -240,7 +240,7 @@ public: void Normalize(bool bPointFirst = true); /// @return the document (SwDoc) at which the PaM is registered - SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); } + SwDoc* GetDoc() const { return &m_pPoint->nNode.GetNode().GetDoc(); } SwPosition& GetBound( bool bOne = true ) { return bOne ? m_Bound1 : m_Bound2; } |