mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +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:
@@ -103,7 +103,6 @@ namespace std
|
||||
#ifdef __AUDACITY_OLD_STD__
|
||||
namespace tr1
|
||||
{
|
||||
#endif
|
||||
template<typename T> struct hash;
|
||||
template<> struct hash< NormalizedKeyString > {
|
||||
size_t operator () (const NormalizedKeyString &str) const // noexcept
|
||||
@@ -113,8 +112,17 @@ namespace std
|
||||
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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user