summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-10-25 19:35:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-10-25 19:51:27 +0200
commit583b49dca97c26365bd6bafafc422297aa7e9ed1 (patch)
tree90478d221aa9533dd8eb40cfa0e4b19b0ff0135d
parent3c4011ea3552ee55ba8dc2c92639190016253b00 (diff)
Work around bogus Clang C++17 -Werror,-Wunused-value
...see <https://bugs.llvm.org/show_bug.cgi?id=35073> "Unexpected -Wunused-value with -std=c++17". The dereference operator is only there to make OWeakObject's conversion operator to css::uno::Reference<css::uno::XInterface> kick in, to avoid an ambiguous conversion to XInterface, so use an rtl::Reference instead, which removes the need for the dereference and makes the warning go away. Change-Id: I52ddaa098d43eb1507ca621f9e9511dcfc0fdb9a
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index afd25657ae48..3e8dbea7a63a 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -536,7 +536,7 @@ namespace dbaccess
if ( xDocDefinition.is() )
{
Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW );
- Reference< XInterface >( *new SubComponentLoader( xController, xDocDefinition ) );
+ rtl::Reference< SubComponentLoader >( new SubComponentLoader( xController, xDocDefinition ) );
}
return xSubComponent;
@@ -589,7 +589,7 @@ namespace dbaccess
}
Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW );
- Reference< XInterface >( *new SubComponentLoader( xController, xSubComponent ) );
+ rtl::Reference< SubComponentLoader >( new SubComponentLoader( xController, xSubComponent ) );
return xSubComponent;
}