Update fmt to version 6.2.1 (9 May 2020)

This commit is contained in:
Wojtek Figat
2021-07-08 17:46:23 +02:00
parent 1eda04f695
commit f052d788fe
11 changed files with 4660 additions and 3352 deletions

View File

@@ -17,7 +17,7 @@ namespace fmt_flax
template<typename T, typename... Args>
FORCE_INLINE static void format(fmt::basic_memory_buffer<T, fmt::inline_buffer_size, std_flax::allocator<T>>& buffer, const T* format, const Args& ... args)
{
typedef typename fmt::buffer_context<T>::type context;
typedef fmt::buffer_context<T> context;
fmt::format_arg_store<context, Args...> as{ args... };
fmt::internal::vformat_to(buffer, fmt::to_string_view(format), fmt::basic_format_args<context>(as));
}

View File

@@ -82,8 +82,6 @@ namespace MUtils
template<typename T, typename Enable = void>
struct MConverter
{
static_assert(fmt::internal::no_formatter_error<T>::value, "Unsupported type for Scripting API.");
MonoObject* Box(const T& data, MonoClass* klass);
void Unbox(T& result, MonoObject* data);
void ToManagedArray(MonoArray* result, const Span<T>& data);

View File

@@ -93,7 +93,7 @@ public:
void WriteLine(const CharType* format, const Args& ... args)
{
fmt::basic_memory_buffer<CharType, fmt::inline_buffer_size, std_flax::allocator<CharType>> w;
format_to(w, format, args...);
fmt_flax::format(w, format, args...);
const int32 len = (int32)w.size();
_buffer.WriteBytes((void*)w.data(), len * sizeof(CharType));
WriteLine();
@@ -133,7 +133,7 @@ public:
void Write(const CharType* format, const Args& ... args)
{
fmt::basic_memory_buffer<CharType, fmt::inline_buffer_size, std_flax::allocator<CharType>> w;
format_to(w, format, args...);
fmt_flax::format(w, format, args...);
const int32 len = (int32)w.size();
_buffer.WriteBytes((void*)w.data(), len * sizeof(CharType));
}