summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /extensions
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/ole/oleobjw.cxx2
-rw-r--r--extensions/source/propctrlr/cellbindinghelper.cxx2
-rw-r--r--extensions/source/propctrlr/formbrowsertools.hxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index f96d005cef29..f7070bfe6eb1 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -2249,7 +2249,7 @@ bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
OSL_ASSERT(m_spDispatch);
LPOLESTR lpsz = const_cast<LPOLESTR> (reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id);
- return hr == S_OK ? true : false;
+ return hr == S_OK;
}
void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** pFuncDesc)
diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx
index 41fbf95a2ce5..e3bf34a93eee 100644
--- a/extensions/source/propctrlr/cellbindinghelper.cxx
+++ b/extensions/source/propctrlr/cellbindinghelper.cxx
@@ -70,7 +70,7 @@ namespace pcr
inline bool operator()( const OUString& _rCompare )
{
- return ( _rCompare == m_sReference ) ? true : false;
+ return ( _rCompare == m_sReference );
}
};
}
diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx
index 30c49e15bdb0..5dd9a8f4036c 100644
--- a/extensions/source/propctrlr/formbrowsertools.hxx
+++ b/extensions/source/propctrlr/formbrowsertools.hxx
@@ -72,7 +72,7 @@ namespace pcr
{
bool operator() (::com::sun::star::beans::Property _rLhs, ::com::sun::star::beans::Property _rRhs) const
{
- return _rLhs.Name < _rRhs.Name ? true : false;
+ return _rLhs.Name < _rRhs.Name;
}
};
@@ -85,7 +85,7 @@ namespace pcr
{
bool operator() (::com::sun::star::uno::Type _rLhs, ::com::sun::star::uno::Type _rRhs) const
{
- return _rLhs.getTypeName() < _rRhs.getTypeName() ? true : false;
+ return _rLhs.getTypeName() < _rRhs.getTypeName();
}
};