summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-23 16:36:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 07:18:35 +0100
commitb1d48a0e22bb8d2eabead41a6a6b53ffaec932e4 (patch)
tree0be36b589a3595a16a7d4d2a9ee78012dd700c4c /comphelper
parent8d23f9c2c1e0479a95cb44a09066740213b0f99a (diff)
loplugin:makeshared in chart2..comphelper
Change-Id: Ia25f5de3167fd554d463ce6111e8c5b0e7842907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/DirectoryHelper.cxx2
-rw-r--r--comphelper/source/misc/backupfilehelper.cxx8
-rw-r--r--comphelper/source/misc/logging.cxx2
-rw-r--r--comphelper/source/misc/sharedmutex.cxx2
4 files changed, 7 insertions, 7 deletions
diff --git a/comphelper/source/misc/DirectoryHelper.cxx b/comphelper/source/misc/DirectoryHelper.cxx
index a659421654b3..fa5380d425dd 100644
--- a/comphelper/source/misc/DirectoryHelper.cxx
+++ b/comphelper/source/misc/DirectoryHelper.cxx
@@ -46,7 +46,7 @@ bool DirectoryHelper::fileExists(const OUString& rBaseURL)
{
if (!rBaseURL.isEmpty())
{
- FileSharedPtr aBaseFile(new osl::File(rBaseURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(rBaseURL);
return (osl::File::E_None == aBaseFile->open(osl_File_OpenFlag_Read));
}
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index ffbcb1386222..e58fe768f15b 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1166,7 +1166,7 @@ namespace
maPackedFileEntryVector(),
mbChanged(false)
{
- FileSharedPtr aSourceFile(new osl::File(rURL));
+ FileSharedPtr aSourceFile = std::make_shared<osl::File>(rURL);
if (osl::File::E_None == aSourceFile->open(osl_File_OpenFlag_Read))
{
@@ -2083,7 +2083,7 @@ namespace comphelper
{
const OUString aPackURL(createPackURL(rTargetURL, rName));
PackedFile aPackedFile(aPackURL);
- FileSharedPtr aBaseFile(new osl::File(aFileURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aFileURL);
if (aPackedFile.tryPush(aBaseFile, mbCompress))
{
@@ -2284,7 +2284,7 @@ namespace comphelper
{
const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
PackedFile aPackedFile(aPackURL);
- FileSharedPtr aBaseFile(new osl::File(aTempURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
if (aPackedFile.tryPush(aBaseFile, mbCompress))
{
@@ -2336,7 +2336,7 @@ namespace comphelper
{
// last config is in temp file, load it to ExtensionInfo
ExtensionInfo aLoadedExtensionInfo;
- FileSharedPtr aBaseFile(new osl::File(aTempURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
if (osl::File::E_None == aBaseFile->open(osl_File_OpenFlag_Read))
{
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index 4054222c855d..405a4acaeb68 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -65,7 +65,7 @@ namespace comphelper
}
EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const char* _pAsciiLoggerName )
- :m_pImpl( new EventLogger_Impl( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) )
+ :m_pImpl( std::make_shared<EventLogger_Impl>( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) )
{
}
diff --git a/comphelper/source/misc/sharedmutex.cxx b/comphelper/source/misc/sharedmutex.cxx
index 176c8acaa7f2..58ae35df5924 100644
--- a/comphelper/source/misc/sharedmutex.cxx
+++ b/comphelper/source/misc/sharedmutex.cxx
@@ -26,7 +26,7 @@ namespace comphelper
{
SharedMutex::SharedMutex()
- :m_pMutexImpl( new ::osl::Mutex )
+ :m_pMutexImpl( std::make_shared<::osl::Mutex >())
{
}