summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Pronin <dannftk@yandex.ru>2020-01-28 09:23:18 +0300
committerHubert Figuière <hub@figuiere.net>2020-02-09 00:28:52 -0500
commit609255d7c4d662c3691914099d477d8c05599215 (patch)
treea4fd3177397695952960f8735f2d94ae154356fb
parent46c67dfe2dcdc03b7523dacf47cb83586c1addbf (diff)
Support clang with libc++ and c++17
- don't use tr1 - remove deprecated C++ See https://gitlab.freedesktop.org/libopenraw/exempi/merge_requests/1 Signed-off-by: Hubert Figuière <hub@figuiere.net>
-rw-r--r--XMPFiles/source/PluginHandler/ModuleUtils.h2
-rw-r--r--XMPFiles/source/PluginHandler/OS_Utils_Linux.cpp2
-rw-r--r--XMPFiles/source/PluginHandler/PluginManager.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/XMPFiles/source/PluginHandler/ModuleUtils.h b/XMPFiles/source/PluginHandler/ModuleUtils.h
index b4c2d71..2910a46 100644
--- a/XMPFiles/source/PluginHandler/ModuleUtils.h
+++ b/XMPFiles/source/PluginHandler/ModuleUtils.h
@@ -19,7 +19,7 @@ typedef HMODULE OS_ModuleRef;
#include <memory>
typedef CFBundleRef OS_ModuleRef;
#elif XMP_UNIXBuild
-#include <tr1/memory>
+#include <memory>
typedef void* OS_ModuleRef;
#else
#error Unsupported operating system
diff --git a/XMPFiles/source/PluginHandler/OS_Utils_Linux.cpp b/XMPFiles/source/PluginHandler/OS_Utils_Linux.cpp
index 7808a98..b3ac39e 100644
--- a/XMPFiles/source/PluginHandler/OS_Utils_Linux.cpp
+++ b/XMPFiles/source/PluginHandler/OS_Utils_Linux.cpp
@@ -28,7 +28,7 @@ typedef std::map<OS_ModuleRef, std::string> ResourceFileToPathMap;
static ResourceFileToPathMap sMapResourceFileToPath;
static XMP_ReadWriteLock sMapModuleRWLock;
-typedef std::tr1::shared_ptr<int> FilePtr;
+typedef std::shared_ptr<int> FilePtr;
static std::string GetModulePath( OS_ModuleRef inOSModule );
/** ************************************************************************************************************************
diff --git a/XMPFiles/source/PluginHandler/PluginManager.cpp b/XMPFiles/source/PluginHandler/PluginManager.cpp
index bfc132e..99f4875 100644
--- a/XMPFiles/source/PluginHandler/PluginManager.cpp
+++ b/XMPFiles/source/PluginHandler/PluginManager.cpp
@@ -687,8 +687,8 @@ void PluginManager::scanRecursive( const std::string & tempPath, std::vector<std
}
StringVec::const_iterator iterFound =
- std::find_if ( mExtensions.begin(), mExtensions.end(),
- std::bind2nd ( std::equal_to<std::string>(), fileExt ) );
+ std::find_if ( mExtensions.begin(), mExtensions.end(),
+ [&fileExt](auto const &file_ext){ return file_ext == fileExt; });
if ( iterFound != mExtensions.end() ) {
@@ -698,7 +698,7 @@ void PluginManager::scanRecursive( const std::string & tempPath, std::vector<std
StringVec::const_iterator pluginNeeded =
std::find_if ( mPluginsNeeded.begin(), mPluginsNeeded.end(),
- std::bind2nd ( std::equal_to<std::string>(), childName ) );
+ [&childName](auto const &child_name){ return child_name == childName; });
if ( (pluginNeeded != mPluginsNeeded.end()) || mPluginsNeeded.empty() ) {
ioFoundLibs.push_back ( childPath );