Fix build with clang 10
PR: 245004
Obtained from: 2661a17c7e (diff-4a56fc9353bac10cf2f51e22e38e3b2a)
(part)
Approved by: portmgr (blanket)
This commit is contained in:
parent
9be215704e
commit
dd087e4403
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528972
2 changed files with 48 additions and 0 deletions
|
@ -0,0 +1,30 @@
|
|||
--- Telegram/ThirdParty/rlottie/src/lottie/rapidjson/document.h.orig 2020-01-23 12:47:53 UTC
|
||||
+++ Telegram/ThirdParty/rlottie/src/lottie/rapidjson/document.h
|
||||
@@ -24,6 +24,9 @@
|
||||
#include "encodedstream.h"
|
||||
#include <new> // placement new
|
||||
#include <limits>
|
||||
+#ifdef __cpp_impl_three_way_comparison
|
||||
+#include <compare>
|
||||
+#endif
|
||||
|
||||
RAPIDJSON_DIAG_PUSH
|
||||
#ifdef __clang__
|
||||
@@ -175,12 +178,17 @@ class GenericMemberIterator { (public)
|
||||
|
||||
//! @name relations
|
||||
//@{
|
||||
+#ifdef __cpp_impl_three_way_comparison
|
||||
+ template <bool Const_> bool operator==(const GenericMemberIterator<Const_,Encoding,Allocator>& that) const { return ptr_ == that.ptr_; }
|
||||
+ template <bool Const_> std::strong_ordering operator<=>(const GenericMemberIterator<Const_,Encoding,Allocator>& that) const { return ptr_ <=> that.ptr_; }
|
||||
+#else
|
||||
bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; }
|
||||
bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; }
|
||||
bool operator<=(ConstIterator that) const { return ptr_ <= that.ptr_; }
|
||||
bool operator>=(ConstIterator that) const { return ptr_ >= that.ptr_; }
|
||||
bool operator< (ConstIterator that) const { return ptr_ < that.ptr_; }
|
||||
bool operator> (ConstIterator that) const { return ptr_ > that.ptr_; }
|
||||
+#endif
|
||||
//@}
|
||||
|
||||
//! @name dereference
|
|
@ -0,0 +1,18 @@
|
|||
--- Telegram/lib_base/base/thread_safe_wrap.h.orig 2020-01-29 09:41:30 UTC
|
||||
+++ Telegram/lib_base/base/thread_safe_wrap.h
|
||||
@@ -19,13 +19,13 @@ class thread_safe_wrap { (public)
|
||||
|
||||
template <typename Callback>
|
||||
auto with(Callback &&callback) {
|
||||
- QMutexLocker lock(&_mutex);
|
||||
+ QMutexLocker lock((QBasicMutex *)&_mutex);
|
||||
return callback(_value);
|
||||
}
|
||||
|
||||
template <typename Callback>
|
||||
auto with(Callback &&callback) const {
|
||||
- QMutexLocker lock(&_mutex);
|
||||
+ QMutexLocker lock((QBasicMutex *)&_mutex);
|
||||
return callback(_value);
|
||||
}
|
||||
|
Loading…
Reference in a new issue