summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-03-17 21:36:10 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-03-17 20:24:17 +0100
commit04cf6de098f0677b2623377c20983f229f0156be (patch)
tree084fb5365305e4579d9ce7242630d4c6888a091b /svl
parent4859d0b6cee9477ab65e86923e7c0a0b88022d8e (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: I6d1523e71b3e06be1cf41abaabb44e49fe11cd8e Reviewed-on: https://gerrit.libreoffice.org/69369 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsstorage.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index d3eae55b363b..c1727b93d3cd 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -369,7 +369,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
- xResult = static_cast< io::XStream* >( new OFSInputStreamContainer( xInStream ) );
+ xResult = new OFSInputStreamContainer(xInStream);
}
}
catch( embed::InvalidStorageException& )
@@ -1124,7 +1124,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
uno::Reference< io::XStream > xStream =
xSimpleFileAccess->openFileReadWrite( aFileURL );
- xResult = static_cast< io::XStream* >( new OFSStreamContainer( xStream ) );
+ xResult = new OFSStreamContainer(xStream);
}
else
{
@@ -1135,7 +1135,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
{
uno::Reference< io::XStream > xStream =
uno::Reference < io::XStream >( new ::utl::OStreamWrapper( std::move(pStream) ) );
- xResult = static_cast< io::XStream* >( new OFSStreamContainer( xStream ) );
+ xResult = new OFSStreamContainer(xStream);
}
}
@@ -1156,7 +1156,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
::ucbhelper::Content aResultContent( aFileURL, xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
- xResult = static_cast< io::XStream* >( new OFSInputStreamContainer( xInStream ) );
+ xResult = new OFSInputStreamContainer(xInStream);
}
}
catch( embed::InvalidStorageException& )