From 61cb4effb830383cfdc4e6f285349ef8438ec280 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 5 Apr 2016 15:31:19 -0400 Subject: [PATCH] more explicit name for callback type from dlsym --- include/mapnik/plugin.hpp | 2 +- src/plugin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mapnik/plugin.hpp b/include/mapnik/plugin.hpp index a3428de81..4694e121e 100644 --- a/include/mapnik/plugin.hpp +++ b/include/mapnik/plugin.hpp @@ -38,7 +38,7 @@ using mapnik_lib_t = struct _mapnik_lib_t; class PluginInfo : util::noncopyable { public: - using name_func = const char* (*) (); + using callable_returning_string = const char* (*) (); PluginInfo (std::string const& filename, std::string const& library_name); ~PluginInfo(); diff --git a/src/plugin.cpp b/src/plugin.cpp index 9037f5300..6e3c9fc2b 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -58,7 +58,7 @@ PluginInfo::PluginInfo(std::string const& filename, if (module_) module_->dl = LoadLibraryA(filename.c_str()); if (module_ && module_->dl) { - name_func name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); + callable_returning_string name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); if (name) name_ = name(); } #else @@ -66,7 +66,7 @@ PluginInfo::PluginInfo(std::string const& filename, if (module_) module_->dl = dlopen(filename.c_str(),RTLD_LAZY); if (module_ && module_->dl) { - name_func name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); + callable_returning_string name = reinterpret_cast(dlsym(module_->dl, library_name.c_str())); if (name) name_ = name(); } #else