1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-04 08:04:06 +01:00

Fix compilation warnings on Mac

This commit is contained in:
Paul Licameli
2018-01-08 19:09:13 -05:00
parent cb403954fa
commit bec6f237bc

View File

@@ -1150,19 +1150,23 @@ make_value_transform_iterator(const Iterator &iterator, Function function)
// For using std::unordered_map on wxString // For using std::unordered_map on wxString
namespace std namespace std
#ifdef __AUDACITY_OLD_STD__
::tr1
#endif
{ {
template<typename T> struct hash; #ifdef __AUDACITY_OLD_STD__
template<> struct hash< wxString > { namespace tr1
size_t operator () (const wxString &str) const // noexcept {
{ #endif
auto stdstr = str.ToStdWstring(); // no allocations, a cheap fetch template<typename T> struct hash;
using Hasher = hash< decltype(stdstr) >; template<> struct hash< wxString > {
return Hasher{}( stdstr ); size_t operator () (const wxString &str) const // noexcept
} {
}; auto stdstr = str.ToStdWstring(); // no allocations, a cheap fetch
}; using Hasher = hash< decltype(stdstr) >;
return Hasher{}( stdstr );
}
};
#ifdef __AUDACITY_OLD_STD__
}
#endif
}
#endif // __AUDACITY_MEMORY_X_H__ #endif // __AUDACITY_MEMORY_X_H__