MCPcopy Create free account
hub / github.com/audacity/audacity / CompareEffectsByTypeAndName

Function CompareEffectsByTypeAndName

src/menus/MenuHelper.cpp:454–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454bool CompareEffectsByTypeAndName(
455 const PluginDescriptor *a, const PluginDescriptor *b)
456{
457 auto &em = EffectManager::Get();
458 auto akey = em.GetEffectFamilyName(a->GetID());
459 auto bkey = em.GetEffectFamilyName(b->GetID());
460
461 if (akey.empty())
462 akey = XO("Uncategorized");
463 if (bkey.empty())
464 bkey = XO("Uncategorized");
465
466 if (a->IsEffectDefault())
467 akey = {};
468 if (b->IsEffectDefault())
469 bkey = {};
470
471 return
472 std::make_tuple(
473 akey.Translation(), a->GetSymbol().Translation(), a->GetPath() ) <
474 std::make_tuple(
475 bkey.Translation(), b->GetSymbol().Translation(), b->GetPath() );
476}
477
478bool CompareEffectsByType(const PluginDescriptor *a, const PluginDescriptor *b)
479{

Callers

nothing calls this directly

Calls 8

GetFunction · 0.85
GetEffectFamilyNameMethod · 0.80
IsEffectDefaultMethod · 0.80
TranslationMethod · 0.80
GetIDMethod · 0.45
emptyMethod · 0.45
GetSymbolMethod · 0.45
GetPathMethod · 0.45

Tested by

no test coverage detected