1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Remove most uses of AUDACITY_OLD_STD

This commit is contained in:
Paul Licameli
2018-04-16 12:50:14 -04:00
parent 56c42e870e
commit 7a0475e39f
23 changed files with 12 additions and 120 deletions

View File

@@ -59,9 +59,7 @@ ShuttleGui.
#include "../Experimental.h"
#include "../commands/ScreenshotCommand.h"
#ifndef __AUDACITY_OLD_STD__
#include <unordered_map>
#endif
#include "../commands/CommandContext.h"
AudacityCommand::AudacityCommand()

View File

@@ -566,11 +566,7 @@ std::unique_ptr<wxMenuBar> CommandManager::AddMenuBar(const wxString & sMenu)
}
auto result = std::make_unique<wxMenuBar>();
#ifdef __AUDACITY_OLD_STD__
mMenuBarList.push_back(MenuBarListEntry{sMenu, result.get()});
#else
mMenuBarList.emplace_back(sMenu, result.get());
#endif
return result;
}

View File

@@ -28,9 +28,7 @@
#include "audacity/Types.h"
#ifndef __AUDACITY_OLD_STD__
#include <unordered_map>
#endif
using CommandParameter = wxString;
class TranslatedInternalString;
@@ -100,21 +98,6 @@ using CommandList = std::vector<movable_ptr<CommandListEntry>>;
namespace std
{
#ifdef __AUDACITY_OLD_STD__
namespace tr1
{
template<typename T> struct hash;
template<> struct hash< NormalizedKeyString > {
size_t operator () (const NormalizedKeyString &str) const // noexcept
{
auto &stdstr = str.Raw(); // no allocations, a cheap fetch
using Hasher = hash< wxString >;
return Hasher{}( stdstr );
}
};
}
#else
// in std, not in tr1.
template<> struct hash< NormalizedKeyString > {
size_t operator () (const NormalizedKeyString &str) const // noexcept
{
@@ -123,7 +106,6 @@ namespace std
return Hasher{}( stdstr );
}
};
#endif
}
using CommandKeyHash = std::unordered_map<NormalizedKeyString, CommandListEntry*>;