本文整理汇总了C++中FileSearchPath::removeRedundantPaths方法的典型用法代码示例。如果您正苦于以下问题:C++ FileSearchPath::removeRedundantPaths方法的具体用法?C++ FileSearchPath::removeRedundantPaths怎么用?C++ FileSearchPath::removeRedundantPaths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSearchPath
的用法示例。
在下文中一共展示了FileSearchPath::removeRedundantPaths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: crashedPlugins
PluginDirectoryScanner::PluginDirectoryScanner (KnownPluginList& listToAddTo,
AudioPluginFormat& formatToLookFor,
FileSearchPath directoriesToSearch,
const bool recursive,
const File& deadMansPedal)
: list (listToAddTo),
format (formatToLookFor),
deadMansPedalFile (deadMansPedal),
progress (0)
{
directoriesToSearch.removeRedundantPaths();
filesOrIdentifiersToScan = format.searchPathsForPlugins (directoriesToSearch, recursive);
// If any plugins have crashed recently when being loaded, move them to the
// end of the list to give the others a chance to load correctly..
const StringArray crashedPlugins (readDeadMansPedalFile (deadMansPedalFile));
for (int i = 0; i < crashedPlugins.size(); ++i)
{
const String f = crashedPlugins[i];
for (int j = filesOrIdentifiersToScan.size(); --j >= 0;)
if (f == filesOrIdentifiersToScan[j])
filesOrIdentifiersToScan.move (j, -1);
}
applyBlacklistingsFromDeadMansPedal (listToAddTo, deadMansPedalFile);
nextIndex.set (filesOrIdentifiersToScan.size());
}
示例2: list
PluginDirectoryScanner::PluginDirectoryScanner (KnownPluginList& listToAddTo,
AudioPluginFormat& formatToLookFor,
FileSearchPath directoriesToSearch,
const bool recursive,
const File& deadMansPedal,
bool allowPluginsWhichRequireAsynchronousInstantiation)
: list (listToAddTo),
format (formatToLookFor),
deadMansPedalFile (deadMansPedal),
allowAsync (allowPluginsWhichRequireAsynchronousInstantiation)
{
directoriesToSearch.removeRedundantPaths();
filesOrIdentifiersToScan = format.searchPathsForPlugins (directoriesToSearch, recursive, allowAsync);
// If any plugins have crashed recently when being loaded, move them to the
// end of the list to give the others a chance to load correctly..
for (auto& crashed : readDeadMansPedalFile (deadMansPedalFile))
for (int j = filesOrIdentifiersToScan.size(); --j >= 0;)
if (crashed == filesOrIdentifiersToScan[j])
filesOrIdentifiersToScan.move (j, -1);
applyBlacklistingsFromDeadMansPedal (listToAddTo, deadMansPedalFile);
nextIndex.set (filesOrIdentifiersToScan.size());
}
示例3: crashedPlugins
BEGIN_JUCE_NAMESPACE
#include "juce_PluginDirectoryScanner.h"
#include "juce_AudioPluginFormat.h"
#include "../../io/files/juce_DirectoryIterator.h"
//==============================================================================
PluginDirectoryScanner::PluginDirectoryScanner (KnownPluginList& listToAddTo,
AudioPluginFormat& formatToLookFor,
FileSearchPath directoriesToSearch,
const bool recursive,
const File& deadMansPedalFile_)
: list (listToAddTo),
format (formatToLookFor),
deadMansPedalFile (deadMansPedalFile_),
nextIndex (0),
progress (0)
{
directoriesToSearch.removeRedundantPaths();
filesOrIdentifiersToScan = format.searchPathsForPlugins (directoriesToSearch, recursive);
// If any plugins have crashed recently when being loaded, move them to the
// end of the list to give the others a chance to load correctly..
const StringArray crashedPlugins (getDeadMansPedalFile());
for (int i = 0; i < crashedPlugins.size(); ++i)
{
const String f = crashedPlugins[i];
for (int j = filesOrIdentifiersToScan.size(); --j >= 0;)
if (f == filesOrIdentifiersToScan[j])
filesOrIdentifiersToScan.move (j, -1);
}
}