# HG changeset patch # User Chris Cannam # Date 1479477769 0 # Node ID 628a5b8ff6346db27d282574fb5a2f583098feef # Parent 15348e89c1d72adfda2fb495638f135370b36589 Revert to C++98 -- this library is not supposed to use C++11 diff -r 15348e89c1d7 -r 628a5b8ff634 src/vamp-hostsdk/Files.cpp --- a/src/vamp-hostsdk/Files.cpp Fri Nov 18 12:53:21 2016 +0000 +++ b/src/vamp-hostsdk/Files.cpp Fri Nov 18 14:02:49 2016 +0000 @@ -66,7 +66,7 @@ vector Files::listLibraryFiles() { - return listLibraryFilesMatching({}); + return listLibraryFilesMatching(Filter()); } vector @@ -78,7 +78,8 @@ // we match case-insensitively, but only with ascii range // characters (input strings are expected to be utf-8) vector libraryNames; - for (auto n: filter.libraryNames) { + for (int j = 0; j < int(filter.libraryNames.size()); ++j) { + string n = filter.libraryNames[j]; for (size_t i = 0; i < n.length(); ++i) { if (!(n[i] & 0x80)) { n[i] = char(tolower(n[i])); @@ -97,9 +98,9 @@ // we match case-insensitively, but only with ascii range // characters (this string is expected to be utf-8) string cleaned = *fi; - for (size_t i = 0; i < cleaned.length(); ++i) { - if (!(cleaned[i] & 0x80)) { - cleaned[i] = char(tolower(cleaned[i])); + for (size_t j = 0; j < cleaned.length(); ++j) { + if (!(cleaned[j] & 0x80)) { + cleaned[j] = char(tolower(cleaned[j])); } } @@ -119,8 +120,8 @@ break; case Filter::Matching: - for (const auto &n: libraryNames) { - if (cleaned == n) { + for (int j = 0; j < int(libraryNames.size()); ++j) { + if (cleaned == libraryNames[j]) { matched = true; break; } @@ -129,8 +130,8 @@ case Filter::NotMatching: matched = true; - for (const auto &n: libraryNames) { - if (cleaned == n) { + for (int j = 0; j < int(libraryNames.size()); ++j) { + if (cleaned == libraryNames[j]) { matched = false; break; } diff -r 15348e89c1d7 -r 628a5b8ff634 src/vamp-hostsdk/PluginLoader.cpp --- a/src/vamp-hostsdk/PluginLoader.cpp Fri Nov 18 12:53:21 2016 +0000 +++ b/src/vamp-hostsdk/PluginLoader.cpp Fri Nov 18 14:02:49 2016 +0000 @@ -213,11 +213,13 @@ PluginLoader::PluginKeyList PluginLoader::Impl::listPlugins() { - if (!m_allPluginsEnumerated) enumeratePlugins({}); + if (!m_allPluginsEnumerated) enumeratePlugins(Enumeration()); vector plugins; - for (const auto &mi: m_pluginLibraryNameMap) { - plugins.push_back(mi.first); + for (map::const_iterator i = + m_pluginLibraryNameMap.begin(); + i != m_pluginLibraryNameMap.end(); ++i) { + plugins.push_back(i->first); } return plugins; @@ -259,10 +261,11 @@ std::cerr << "WARNING: Vamp::HostExt::PluginLoader: " << "Invalid plugin key \"" << enumeration.key << "\" in enumerate" << std::endl; - return {}; + return vector(); } filter.type = Files::Filter::Matching; - filter.libraryNames = { libraryName }; + filter.libraryNames.clear(); + filter.libraryNames.push_back(libraryName); break; }