path: root/sw/source
diff options
authorStephan Bergmann <>2020-05-28 08:26:51 +0200
committerStephan Bergmann <>2020-05-28 09:48:09 +0200
commite84d05483cc5f30161dc5b15f93fb3bf71ed636e (patch)
tree2a343319cb4c1e06060b632de4fc840ba96bb70f /sw/source
parent412ff42bf0a6d078b9a6fd1daa8d0eb0b9a78c4a (diff)
Make loplugin:simplifypointertobool handle parenthesized expressions discussed as an open TODO in the commit message of fe6cce01c88d045a1fcf09acf049c34c22299b02 "Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr". The necessary changes across the code base have been done fully automatically with the rewriting plugin on Linux. (All those changes apparently involve uses of macro arguments wrapped in parentheses in the macro body, but always in conditionally-converted-to-bool contexts. In other contexts, such automatic rewriting would add the "bool" to the macro body, which would be wrong in general, but we apparently get away with that sloppy coding for now.) The parenExprs_ stack that fe6cce01c88d045a1fcf09acf049c34c22299b02 had introduced to treat such (then-undetected, it had turned out) parenthesized cases now turns out to not be needed after all. Change-Id: I2021f61c2e2805be7e18b38edf8744d186cac3cb Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
Diffstat (limited to 'sw/source')
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 9104497ccd2e..219ca13aee71 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -677,7 +677,7 @@ void HTMLTableCnts::Add( std::unique_ptr<HTMLTableCnts> pNewCnts )
inline void HTMLTableCnts::SetTableBox( SwTableBox *pBox )
- OSL_ENSURE(m_xLayoutInfo.get(), "There is no layout info");
+ OSL_ENSURE(m_xLayoutInfo, "There is no layout info");
if (m_xLayoutInfo)
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 95e96f9357b6..3b4ed85e97e2 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1281,7 +1281,7 @@ the appropriate set/ask field.
long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
OUString &rOrigName, const OUString &rData)
- OSL_ENSURE(m_xPlcxMan.get(), "No pPlcxMan");
+ OSL_ENSURE(m_xPlcxMan, "No pPlcxMan");
long nNo;
If there was no bookmark associated with this set field, then we create a
@@ -1344,7 +1344,7 @@ SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pField,
OUString SwWW8ImplReader::GetMappedBookmark(const OUString &rOrigName)
OUString sName(BookmarkToWriter(rOrigName));
- OSL_ENSURE(m_xPlcxMan.get(), "no pPlcxMan");
+ OSL_ENSURE(m_xPlcxMan, "no pPlcxMan");
//See if there has been a variable set with this name, if so get