mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Improve Mac wx3.1.1 compatibility
1. Qualify hash as std::hash. 2. Ensure we have a header for the function 'free'
This commit is contained in:
parent
dc7d3f9414
commit
effab49a6f
@ -49,6 +49,8 @@
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
#define NSObject wxOSX_10_6_AND_LATER( x ) x
|
||||||
|
|
||||||
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
|
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
|
||||||
{
|
{
|
||||||
FileDialog* _dialog;
|
FileDialog* _dialog;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
// C++ standard header <memory> with a few extensions
|
// C++ standard header <memory> with a few extensions
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <cstdlib> // Needed for free.
|
||||||
#ifndef safenew
|
#ifndef safenew
|
||||||
#define safenew new
|
#define safenew new
|
||||||
#endif
|
#endif
|
||||||
|
@ -103,7 +103,6 @@ namespace std
|
|||||||
#ifdef __AUDACITY_OLD_STD__
|
#ifdef __AUDACITY_OLD_STD__
|
||||||
namespace tr1
|
namespace tr1
|
||||||
{
|
{
|
||||||
#endif
|
|
||||||
template<typename T> struct hash;
|
template<typename T> struct hash;
|
||||||
template<> struct hash< NormalizedKeyString > {
|
template<> struct hash< NormalizedKeyString > {
|
||||||
size_t operator () (const NormalizedKeyString &str) const // noexcept
|
size_t operator () (const NormalizedKeyString &str) const // noexcept
|
||||||
@ -113,8 +112,17 @@ namespace std
|
|||||||
return Hasher{}( stdstr );
|
return Hasher{}( stdstr );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#ifdef __AUDACITY_OLD_STD__
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// in std, not in tr1.
|
||||||
|
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 );
|
||||||
|
}
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,10 @@ static const wxChar *exts[] =
|
|||||||
wxT("mp4")
|
wxT("mp4")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(__WXMAC__)
|
||||||
|
#undef USE_QUICKTIME
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef USE_QUICKTIME
|
#ifndef USE_QUICKTIME
|
||||||
|
|
||||||
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
void GetQTImportPlugin(ImportPluginList &importPluginList,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user