summaryrefslogtreecommitdiff
path: root/sw/inc/pam.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-30 10:10:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-30 14:27:41 +0200
commit93099409f3e9894b7a40182f775d76757fa2fb5b (patch)
tree0ef85877beba2acc6a0764258f9719e3142858eb /sw/inc/pam.hxx
parentdaa058c714804ffbd2aa1ff20096b4c79bebea0c (diff)
SwPaM::GetDoc can return a reference instead
and remove discovered redundant null checks Change-Id: Iac8ad7821d9acfcc9550a96402c02ac248f16f2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/pam.hxx')
-rw-r--r--sw/inc/pam.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 6c87f3559b78..0f80752a276a 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; }