From 5fb407cffebb8ec0cc50cb3e96e1bebf79ad1bc0 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 26 Jun 2020 01:18:40 +0200 Subject: Linux/MacOSX: use standard std::shared_ptr instead of our custom implementation which is kept for compatibility with older compilers. We also introduce compatibility code for old compilers that don't define std::unique_ptr --- src/Core/CoreBase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Core/CoreBase.cpp') diff --git a/src/Core/CoreBase.cpp b/src/Core/CoreBase.cpp index 01d3981a..29bfb74d 100644 --- a/src/Core/CoreBase.cpp +++ b/src/Core/CoreBase.cpp @@ -254,7 +254,11 @@ namespace VeraCrypt bool CoreBase::IsVolumeMounted (const VolumePath &volumePath) const { - return GetMountedVolume (volumePath); + shared_ptr mountedVolume = GetMountedVolume (volumePath); + if (mountedVolume) + return true; + else + return false; } shared_ptr CoreBase::OpenVolume (shared_ptr volumePath, bool preserveTimestamps, shared_ptr password, int pim, shared_ptr kdf, bool truecryptMode, shared_ptr keyfiles, VolumeProtection::Enum protection, shared_ptr protectionPassword, int protectionPim, shared_ptr protectionKdf, shared_ptr protectionKeyfiles, bool sharedAccessAllowed, VolumeType::Enum volumeType, bool useBackupHeaders, bool partitionInSystemEncryptionScope) const -- cgit v1.2.3