mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Update abstract_ui.h
Include #include <cstring> to use memcmp
This commit is contained in:
parent
68420c876a
commit
b0db1009f5
1 changed files with 2 additions and 4 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <pthread.h>
|
||||
#include <cstring>
|
||||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
|
|
@ -77,10 +78,7 @@ protected:
|
|||
{
|
||||
bool operator() (const pthread_t& a, const pthread_t& b) const noexcept
|
||||
{
|
||||
if constexpr (std::is_class_v<pthread_t>) //pthread_t is a struct for ptw32, so this filter works.
|
||||
return a.p < b.p;
|
||||
else
|
||||
return a < b;
|
||||
return std::memcmp(&a, &b, sizeof(pthread_t)) < 0;
|
||||
}
|
||||
};
|
||||
typedef typename std::map<pthread_t,RequestBuffer*, pthread_cmp>::iterator RequestBufferMapIterator;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue