Skip to content

Commit adb94b0

Browse files
committed
Fixup
1 parent 85d4675 commit adb94b0

File tree

14 files changed

+34
-19
lines changed

14 files changed

+34
-19
lines changed

3rdparty/yasio/yasio/io_service.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ SOFTWARE.
4646

4747
#include "yasio/wtimer_hres.hpp"
4848

49+
#include "yasio/tlx/string.hpp"
50+
4951
#if defined(YASIO_ENABLE_KCP)
5052
struct yasio_kcp_options {
5153
int kcp_conv_ = 0;

3rdparty/yasio/yasio/tlx/string.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ class basic_string {
8080
};
8181
__compressed_pair<allocator_type, _Str_storage> _Mypair;
8282

83-
basic_string() : _Mypair(__one_then_variadic_args_t{}, _Alloc{}) {}
83+
basic_string() : _Mypair(__zero_then_variadic_args_t{}) {}
8484
basic_string(nullptr_t) = delete;
8585
explicit basic_string(size_type count) : _Mypair(__one_then_variadic_args_t{}, _Alloc{}) { resize(static_cast<size_type>(count)); }
8686
basic_string(size_type count, const_reference val) : _Mypair(__one_then_variadic_args_t{}, _Alloc{}) { resize(static_cast<size_type>(count), val); }
87-
template <typename _Iter, ::yasio::enable_if_t<::yasio::is_iterator<_Iter>::value, int> = 0>
87+
template <typename _Iter, _TLX enable_if_t<_TLX is_iterator<_Iter>::value, int> = 0>
8888
basic_string(_Iter first, _Iter last) : _Mypair(__one_then_variadic_args_t{}, _Alloc{})
8989
{
9090
assign(first, last);
@@ -122,7 +122,7 @@ class basic_string {
122122
return *this;
123123
}
124124

125-
template <typename _Iter, ::yasio::enable_if_t<::yasio::is_iterator<_Iter>::value, int> = 0>
125+
template <typename _Iter, _TLX enable_if_t<_TLX is_iterator<_Iter>::value, int> = 0>
126126
void assign(_Iter first, _Iter last)
127127
{
128128
_Assign_range(first, last);
@@ -144,7 +144,7 @@ class basic_string {
144144
std::swap(a._Myend, b._Myend);
145145
}
146146

147-
template <typename _Iter, ::yasio::enable_if_t<::yasio::is_iterator<_Iter>::value, int> = 0>
147+
template <typename _Iter, _TLX enable_if_t<_TLX is_iterator<_Iter>::value, int> = 0>
148148
iterator insert(iterator _Where, _Iter first, _Iter last)
149149
{
150150
auto& st = _Mypair._Myval2;
@@ -205,7 +205,7 @@ class basic_string {
205205
}
206206

207207
basic_string& append(view_type value) { return this->append(value.begin(), value.end()); }
208-
template <typename _Iter, ::yasio::enable_if_t<::yasio::is_iterator<_Iter>::value, int> = 0>
208+
template <typename _Iter, _TLX enable_if_t<_TLX is_iterator<_Iter>::value, int> = 0>
209209
basic_string& append(_Iter first, const _Iter last)
210210
{
211211
if (first != last)
@@ -584,7 +584,7 @@ class basic_string {
584584
return st._Mylast; // points to null terminator slot
585585
}
586586

587-
template <typename _Iter, ::yasio::enable_if_t<::yasio::is_iterator<_Iter>::value, int> = 0>
587+
template <typename _Iter, _TLX enable_if_t<_TLX is_iterator<_Iter>::value, int> = 0>
588588
void _Assign_range(_Iter first, _Iter last)
589589
{
590590
auto& st = _Mypair._Myval2;

3rdparty/yasio/yasio/tlx/type_traits.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ struct is_aligned_storage {
4545
template <class _Iter>
4646
struct is_iterator : public std::integral_constant<bool, !std::is_integral<_Iter>::value> {};
4747

48+
template<typename _Iter>
49+
inline constexpr bool is_iterator_v = is_iterator<_Iter>::value;
50+
4851
template <bool _Test, class _Ty = void>
4952
using enable_if_t = typename ::std::enable_if<_Test, _Ty>::type;
5053

3rdparty/yasio/yasio/tlx/vector.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ class vector { // varying size array of values
363363
using iterator = sequence_iterator<_Scary_val>;
364364
using const_iterator = sequence_const_iterator<_Scary_val>;
365365

366-
constexpr explicit vector(const _Alloc& _Al = _Alloc{}) noexcept : _Mypair(_TLX __one_then_variadic_args_t{}, _Al) {}
366+
constexpr vector() noexcept : _Mypair(_TLX __zero_then_variadic_args_t{}) {}
367+
368+
constexpr explicit vector(const _Alloc& _Al) noexcept : _Mypair(_TLX __one_then_variadic_args_t{}, _Al) {}
367369

368370
constexpr explicit vector(const size_type _Count, const _Alloc& _Al = _Alloc()) : _Mypair(_TLX __one_then_variadic_args_t{}, _Al) { _Construct_n(_Count); }
369371

@@ -409,8 +411,8 @@ class vector { // varying size array of values
409411
std::exchange(_Right._Mypair._Myval2._Mylast, nullptr), std::exchange(_Right._Mypair._Myval2._Myend, nullptr))
410412
{}
411413

412-
constexpr vector(vector&& _Right,
413-
const _TLX identity_t<_Alloc>& _Al_) noexcept(std::allocator_traits<_Alloc>::is_always_equal::value && std::is_nothrow_move_constructible_v<_Ty>)
414+
constexpr vector(vector&& _Right, const _TLX identity_t<_Alloc>& _Al_) noexcept(std::allocator_traits<_Alloc>::is_always_equal::value &&
415+
std::is_nothrow_move_constructible_v<_Ty>)
414416
: _Mypair(_TLX __one_then_variadic_args_t{}, _Al_)
415417
{
416418
_Alty& _Al = _Getal();
@@ -864,7 +866,7 @@ class vector { // varying size array of values
864866
}
865867

866868
public:
867-
template <class _Iter, enable_if_t<std::is_pointer_v<_Iter>, int> = 0>
869+
template <class _Iter, enable_if_t<tlx::is_iterator_v<_Iter>, int> = 0>
868870
constexpr iterator insert(const_iterator _Where, _Iter _First, _Iter _Last)
869871
{
870872
auto _Whereptr = _Where._Ptr;

axmol/media/AvfMediaEngine.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ of this software and associated documentation files (the "Software"), to deal
2929
# include <TargetConditionals.h>
3030

3131
# include <assert.h>
32-
# include "yasio/string_view.hpp"
32+
# include "yasio/tlx/string_view.hpp"
3333
# include "yasio/endian_portable.hpp"
3434

3535
# if TARGET_OS_IPHONE

axmol/media/MfMediaEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# include "ntcvt/ntcvt.hpp"
1616
# include "axmol/media/MFUtils.h"
17-
# include "yasio/string_view.hpp"
17+
# include "yasio/tlx/string_view.hpp"
1818

1919
# include "axmol/tlx/format.hpp"
2020

axmol/network/HttpClient-wasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <queue>
3131
#include "axmol/base/Director.h"
3232
#include "axmol/platform/FileUtils.h"
33-
#include "yasio/string_view.hpp"
33+
#include "yasio/tlx/string_view.hpp"
3434

3535
#if EMSCRIPTEN
3636
# include <emscripten/fetch.h>

axmol/platform/android/Device-android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ THE SOFTWARE.
3131
#include "axmol/base/Types.h"
3232
#include "axmol/platform/android/jni/JniHelper.h"
3333
#include "axmol/platform/FileUtils.h"
34-
#include "yasio/string_view.hpp"
34+
#include "yasio/tlx/string_view.hpp"
3535

3636
static const char* deviceHelperClassName = "dev.axmol.lib.AxmolEngine";
3737

axmol/platform/android/FileUtils-android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ THE SOFTWARE.
3434
#include <sys/types.h>
3535
#include <sys/stat.h>
3636

37-
#include "yasio/string_view.hpp"
37+
#include "yasio/tlx/string_view.hpp"
3838

3939
#define LOG_TAG "FileUtils-android.cpp"
4040
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)

axmol/platform/wasm/FileUtils-wasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ THE SOFTWARE.
3535
# include "axmol/base/text_utils.h"
3636
# include <unistd.h>
3737

38-
# include "yasio/string_view.hpp"
38+
# include "yasio/tlx/string_view.hpp"
3939

4040
using namespace std;
4141

0 commit comments

Comments
 (0)