mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 22:12:58 +02:00
Fixes bug #1344 (mac build)
In addition, the Xcode project can now build against the 10.6 or 10.7 SDKs. All that is needed is to change the SDK version and the other settings will change automatically.
This commit is contained in:
@@ -443,7 +443,11 @@ 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;
|
||||
}
|
||||
@@ -508,7 +512,11 @@ void CommandManager::EndMenu()
|
||||
wxMenu* CommandManager::BeginSubMenu(const wxString & tName)
|
||||
{
|
||||
const auto result = new wxMenu{};
|
||||
#ifdef __AUDACITY_OLD_STD__
|
||||
mSubMenuList.push_back(SubMenuListEntry{ tName, result });
|
||||
#else
|
||||
mSubMenuList.emplace_back(tName, result);
|
||||
#endif
|
||||
mbSeparatorAllowed = false;
|
||||
return result;
|
||||
}
|
||||
@@ -802,7 +810,8 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & name,
|
||||
int count)
|
||||
{
|
||||
{
|
||||
auto entry = std::make_unique<CommandListEntry>();
|
||||
// Make a unique_ptr or shared_ptr as appropriate:
|
||||
auto entry = CommandList::value_type{ safenew CommandListEntry() };
|
||||
|
||||
wxString labelPrefix;
|
||||
if (!mSubMenuList.empty()) {
|
||||
|
@@ -83,7 +83,11 @@ using SubMenuList = std::vector < SubMenuListEntry >;
|
||||
|
||||
// This is an array of pointers, not structures, because the hash maps also point to them,
|
||||
// so we don't want the structures to relocate with vector operations.
|
||||
using CommandList = std::vector < std::unique_ptr<CommandListEntry> > ;
|
||||
#ifdef __AUDACITY_OLD_STD__
|
||||
using CommandList = std::vector < std::shared_ptr<CommandListEntry> >;
|
||||
#else
|
||||
using CommandList = std::vector < std::unique_ptr<CommandListEntry> >;
|
||||
#endif
|
||||
|
||||
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(CommandListEntry *, CommandNameHash, class AUDACITY_DLL_API);
|
||||
WX_DECLARE_HASH_MAP_WITH_DECL(int, CommandListEntry *, wxIntegerHash, wxIntegerEqual, CommandIDHash, class AUDACITY_DLL_API);
|
||||
|
Reference in New Issue
Block a user