From f77fb11a5642f4ceb7bbdbae2fce423ba33ab88f Mon Sep 17 00:00:00 2001 From: EZ4Stephen Date: Sat, 15 Nov 2025 10:38:07 +0400 Subject: [PATCH 1/4] Update misc.h.input --- msvc_extra_headers/ardourext/misc.h.input | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/msvc_extra_headers/ardourext/misc.h.input b/msvc_extra_headers/ardourext/misc.h.input index 497224a556..f20c70607f 100644 --- a/msvc_extra_headers/ardourext/misc.h.input +++ b/msvc_extra_headers/ardourext/misc.h.input @@ -242,14 +242,6 @@ inline int64_t abs(int64_t val) throw() #if defined(LIBPBD_DLL) || defined(PBD_IS_IN_WIN_STATIC_LIB) #include -#ifdef LIBPBD_DLL -#define DEFAULT_COMPARISONS_DEFINED -#define DECLARE_DEFAULT_COMPARISONS(Type) \ - LIBPBD_API bool operator > (const Type& lhs, const Type& rhs); \ - LIBPBD_API bool operator < (const Type& lhs, const Type& rhs); \ - LIBPBD_API bool operator != (const Type& lhs, const Type& rhs); \ - LIBPBD_API bool operator == (const Type& lhs, const Type& rhs); -#endif #endif #if defined(BUILDING_LIBARDOUR) || defined(LIBARDOUR_IS_IN_WIN_STATIC_LIB) #include @@ -259,15 +251,6 @@ inline int64_t abs(int64_t val) throw() #endif #endif // __cplusplus -#ifndef DEFAULT_COMPARISONS_DEFINED -#define DEFAULT_COMPARISONS_DEFINED -#define DECLARE_DEFAULT_COMPARISONS(Type) \ - extern bool operator > (const Type& lhs, const Type& rhs); \ - extern bool operator < (const Type& lhs, const Type& rhs); \ - extern bool operator != (const Type& lhs, const Type& rhs); \ - extern bool operator == (const Type& lhs, const Type& rhs); -#endif - #if !defined(LIBPBD_API) || defined(PBD_IS_IN_WIN_STATIC_LIB) // Emulate some C99 math functions which MSVC itself didn't // implement until later in life. From 7f682bfc6fcb6e6b72036dfa6837d46383fc2c9b Mon Sep 17 00:00:00 2001 From: EZ4Stephen Date: Sat, 15 Nov 2025 10:39:25 +0400 Subject: [PATCH 2/4] Update abstract_ui.h --- libs/pbd/pbd/abstract_ui.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index de119fc238..85b474992d 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -73,20 +73,15 @@ protected: }; typedef typename RequestBuffer::rw_vector RequestBufferVector; -#if defined(COMPILER_MINGW) && defined(PTW32_VERSION) struct pthread_cmp { - bool operator() (const ptw32_handle_t& thread1, const ptw32_handle_t& thread2) + bool operator()(const pthread_t& a, const pthread_t& b) const noexcept { - return thread1.p < thread2.p; + return memcmp(&a, &b, sizeof(pthread_t)) < 0; } }; typedef typename std::map::iterator RequestBufferMapIterator; typedef std::map RequestBufferMap; -#else - typedef typename std::map::iterator RequestBufferMapIterator; - typedef std::map RequestBufferMap; -#endif RequestBufferMap request_buffers; From 7ead44d74c86b9ea968f40cbed9c5eb42782e932 Mon Sep 17 00:00:00 2001 From: EZ4Stephen Date: Sat, 15 Nov 2025 10:39:53 +0400 Subject: [PATCH 3/4] Update abstract_ui.inc.cc --- libs/pbd/pbd/abstract_ui.inc.cc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libs/pbd/pbd/abstract_ui.inc.cc b/libs/pbd/pbd/abstract_ui.inc.cc index f3f735c973..049df1ebde 100644 --- a/libs/pbd/pbd/abstract_ui.inc.cc +++ b/libs/pbd/pbd/abstract_ui.inc.cc @@ -32,15 +32,6 @@ #include "pbd/i18n.h" -#ifdef COMPILER_MSVC -#include // Needed for 'DECLARE_DEFAULT_COMPARISONS'. Objects in an STL container can be - // searched and sorted. Thus, when instantiating the container, MSVC complains - // if the type of object being contained has no appropriate comparison operators - // defined (specifically, if operators '<' and '==' are undefined). This seems - // to be the case with ptw32 'pthread_t' which is a simple struct. -DECLARE_DEFAULT_COMPARISONS(ptw32_handle_t) -#endif - using namespace std; #ifndef NDEBUG From df82c4714ef5c3a4e469683b65a7c792c6077b3e Mon Sep 17 00:00:00 2001 From: EZ4Stephen Date: Sat, 15 Nov 2025 21:28:50 +0400 Subject: [PATCH 4/4] Update abstract_ui.h --- libs/pbd/pbd/abstract_ui.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 85b474992d..57ef3a6aac 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -73,15 +73,8 @@ protected: }; typedef typename RequestBuffer::rw_vector RequestBufferVector; - struct pthread_cmp - { - bool operator()(const pthread_t& a, const pthread_t& b) const noexcept - { - return memcmp(&a, &b, sizeof(pthread_t)) < 0; - } - }; - typedef typename std::map::iterator RequestBufferMapIterator; - typedef std::map RequestBufferMap; + typedef typename std::map>::iterator RequestBufferMapIterator; + typedef std::map> RequestBufferMap; RequestBufferMap request_buffers;