summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-07-22 13:50:48 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-07-23 07:53:20 +0200
commiteaf55518621b1fe08a60aec98b4367d7ad722cb9 (patch)
tree6e5e369e98719f705442914c63a442d77d5dbcc2 /sw/source/core/unocore
parentd8270636a57e7dc68ede51308c380e2098f765d7 (diff)
Silence GCC 11 trunk -Werror=nonnull involving dynamic_cast
...where the compiler now warns that the implicit this pointer argument could be null in a member function call made via a dynamic_cast-converted pointer (and where the code apparently relies on the dynamic_cast not to fail) Change-Id: I79482f4a853b6b47c5f9dd099a4e8377a19f7b0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 236481cb03b2..aa3fd65fc2f4 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1707,8 +1707,8 @@ SwXTextCursor::setString(const OUString& aString)
m_pImpl->GetCursorOrThrow(); // just to check if valid
const bool bForceExpandHints( (CursorType::Meta == m_pImpl->m_eType)
- && dynamic_cast<SwXMeta*>(m_pImpl->m_xParentText.get())
- ->CheckForOwnMemberMeta(*GetPaM(), true) );
+ && dynamic_cast<SwXMeta&>(*m_pImpl->m_xParentText)
+ .CheckForOwnMemberMeta(*GetPaM(), true) );
DeleteAndInsert(aString, bForceExpandHints);
}