1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

NormalizedKeyString redefined as TaggedIdentifier

This commit is contained in:
Paul Licameli
2019-02-28 07:37:10 -05:00
parent 3eeb91f23a
commit 11c8377460
7 changed files with 45 additions and 54 deletions

View File

@@ -93,18 +93,6 @@ using SubMenuList = std::vector < std::unique_ptr<SubMenuListEntry> >;
// so we don't want the structures to relocate with vector operations.
using CommandList = std::vector<std::unique_ptr<CommandListEntry>>;
namespace std
{
template<> struct hash< NormalizedKeyString > {
size_t operator () (const NormalizedKeyString &str) const // noexcept
{
auto &stdstr = str.Raw(); // no allocations, a cheap fetch
using Hasher = std::hash< wxString >;
return Hasher{}( stdstr );
}
};
}
using CommandKeyHash = std::unordered_map<NormalizedKeyString, CommandListEntry*>;
using CommandNameHash = std::unordered_map<wxString, CommandListEntry*>;
using CommandIDHash = std::unordered_map<int, CommandListEntry*>;