summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-02-11 09:02:13 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-02-12 09:04:54 +0100
commitcfbd830e9c4d1877989bc4ad93109551a0a4b0b7 (patch)
treea050319e1167c816ac284894de0c2d4a535ee23a /stoc
parent294b9a415929f25982373e91cba9254686074b19 (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: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d Reviewed-on: https://gerrit.libreoffice.org/67664 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index 0e605fed9298..db6327353b53 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -641,7 +641,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::openKey( const OUString& aKeyN
if ( localKey.is() || defaultKey.is() )
{
- return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
+ return new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey);
}
else
{
@@ -678,7 +678,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
m_state = m_xRegistry->m_state++;
- return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
+ return new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey);
}
}
else
@@ -698,7 +698,7 @@ Reference< XRegistryKey > SAL_CALL NestedKeyImpl::createKey( const OUString& aKe
m_state = m_xRegistry->m_state++;
- return static_cast<XRegistryKey*>(new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey));
+ return new NestedKeyImpl(m_xRegistry.get(), localKey, defaultKey);
}
}
}
@@ -786,8 +786,7 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( )
name = localSeq.getConstArray()[i];
lastIndex = name.lastIndexOf('/');
name = name.copy(lastIndex);
- retSeq.getArray()[i] =
- static_cast<XRegistryKey*>(new NestedKeyImpl(name, this));
+ retSeq.getArray()[i] = new NestedKeyImpl(name, this);
}
sal_uInt32 k = local;
@@ -810,8 +809,7 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( )
name = defaultSeq.getConstArray()[i];
lastIndex = name.lastIndexOf('/');
name = name.copy(lastIndex);
- retSeq.getArray()[k++] =
- static_cast<XRegistryKey*>(new NestedKeyImpl(name, this));
+ retSeq.getArray()[k++] = new NestedKeyImpl(name, this);
}
}
@@ -1236,7 +1234,7 @@ Reference< XRegistryKey > SAL_CALL NestedRegistryImpl::getRootKey( )
defaultKey = m_defaultReg->getRootKey();
}
- return static_cast<XRegistryKey*>(new NestedKeyImpl(this, localKey, defaultKey));
+ return new NestedKeyImpl(this, localKey, defaultKey);
}
return Reference<XRegistryKey>();