summaryrefslogtreecommitdiff
path: root/cppuhelper/source/propertysetmixin.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 10:47:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-12 10:11:34 +0200
commit992a33313046f4a4d322db9464c474e7429a019a (patch)
tree494143e3070af872027ecaca840516d3101a881c /cppuhelper/source/propertysetmixin.cxx
parent77c1431ee88ab04a9ff48b849acedee6d455bafb (diff)
clang-tidy: readability-else-after-return
run it against sal,cppu,cppuhelper I had to run this multiple times to catch all the cases in each module, and it requires some hand-tweaking of the resulting output - clang-tidy is not very good about cleaning up trailing spaces, and aligning things nicely. Change-Id: I00336345f5f036e12422b98d66526509380c497a Reviewed-on: https://gerrit.libreoffice.org/36194 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper/source/propertysetmixin.cxx')
-rw-r--r--cppuhelper/source/propertysetmixin.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 00769d590454..741afb427cf3 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -750,7 +750,8 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
object);
}
return strct;
- } else if (wrapDefaulted
+ }
+ if (wrapDefaulted
&& type->getName().startsWith("com.sun.star.beans.Defaulted<"))
{
css::uno::Any strct;
@@ -778,7 +779,8 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
object);
}
return strct;
- } else if (wrapOptional
+ }
+ if (wrapOptional
&& type->getName().startsWith("com.sun.star.beans.Optional<"))
{
css::uno::Any strct;
@@ -809,13 +811,12 @@ css::uno::Any PropertySetMixinImpl::Impl::wrapValue(
object);
}
return strct;
- } else {
- if (wrapAmbiguous || wrapDefaulted || wrapOptional) {
- throw css::uno::RuntimeException(
- "unexpected type of attribute", object);
- }
- return value;
}
+ if (wrapAmbiguous || wrapDefaulted || wrapOptional) {
+ throw css::uno::RuntimeException(
+ "unexpected type of attribute", object);
+ }
+ return value;
}
PropertySetMixinImpl::PropertySetMixinImpl(
@@ -954,21 +955,22 @@ css::uno::Any PropertySetMixinImpl::queryInterface(css::uno::Type const & type)
css::uno::Reference< css::uno::XInterface > ifc(
static_cast< css::beans::XPropertySet * >(this));
return css::uno::Any(&ifc, type);
- } else if ((m_impl->implements & IMPLEMENTS_FAST_PROPERTY_SET) != 0
+ }
+ if ((m_impl->implements & IMPLEMENTS_FAST_PROPERTY_SET) != 0
&& type == css::beans::XFastPropertySet::static_type())
{
css::uno::Reference< css::uno::XInterface > ifc(
static_cast< css::beans::XFastPropertySet * >(this));
return css::uno::Any(&ifc, type);
- } else if ((m_impl->implements & IMPLEMENTS_PROPERTY_ACCESS) != 0
+ }
+ if ((m_impl->implements & IMPLEMENTS_PROPERTY_ACCESS) != 0
&& type == css::beans::XPropertyAccess::static_type())
{
css::uno::Reference< css::uno::XInterface > ifc(
static_cast< css::beans::XPropertyAccess * >(this));
return css::uno::Any(&ifc, type);
- } else {
- return css::uno::Any();
}
+ return css::uno::Any();
}
css::uno::Reference< css::beans::XPropertySetInfo >