summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-03-31 00:06:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-03-31 07:27:24 +0200
commit184be2d1352c5d3f3aa1e276d26c463c6e49b302 (patch)
tree65ee35397f445b264dcb05d0087aed60000f0e75 /xmlhelp
parentf42d729e41da918bc496d5feb5861a09737c438a (diff)
tdf#120703 PVS: remove redundant static casts
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx2
-rw-r--r--xmlhelp/source/treeview/tvfactory.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 10970e8c50e6..e65d414bd97e 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -574,7 +574,7 @@ zipOpen(SAL_UNUSED_PARAMETER const char *) {
OUString language,jar,path;
if( !ugblData->m_pInitial->get_eid().isEmpty() )
- return static_cast<void*>(new Reference< XHierarchicalNameAccess >);
+ return new Reference<XHierarchicalNameAccess>;
else
{
jar = ugblData->m_pInitial->get_jar();
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 30fcd22bff43..60a0596f9dc4 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -153,8 +153,8 @@ Reference< XInterface > SAL_CALL
TVFactory::CreateInstance(
const Reference< XMultiServiceFactory >& xMultiServiceFactory )
{
- XServiceInfo* xP = static_cast<XServiceInfo*>(new TVFactory( comphelper::getComponentContext(xMultiServiceFactory) ));
- return Reference< XInterface >::query( xP );
+ return static_cast<XServiceInfo*>(
+ new TVFactory(comphelper::getComponentContext(xMultiServiceFactory)));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */