Skip to content

Commit

Permalink
3rdparty: Update rapidyml to 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanTheToaster committed Aug 23, 2024
1 parent 40d5c78 commit 7aca2c0
Show file tree
Hide file tree
Showing 35 changed files with 17,762 additions and 8,590 deletions.
4 changes: 2 additions & 2 deletions 3rdparty/rapidyaml/include/c4/charconv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
# if defined(__GNUC__) && __GNUC__ >= 5
C4_SUPPRESS_WARNING_GCC("-Wshift-count-overflow")
# endif
//# include "c4/ext/fast_float.hpp"
#include "fast_float/fast_float.h"
# include "c4/ext/fast_float.hpp"
C4_SUPPRESS_WARNING_GCC_POP
# endif
#elif (C4_CPP >= 17)
Expand Down Expand Up @@ -2172,6 +2171,7 @@ inline size_t atof_first(csubstr str, float * C4_RESTRICT v) noexcept
*/
C4_ALWAYS_INLINE bool atod(csubstr str, double * C4_RESTRICT v) noexcept
{
C4_ASSERT(str.len > 0);
C4_ASSERT(str.triml(" \r\t\n").len == str.len);
#if C4CORE_HAVE_FAST_FLOAT
// fastfloat cannot parse hexadecimal floats
Expand Down
3 changes: 3 additions & 0 deletions 3rdparty/rapidyaml/include/c4/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
# define C4_CLANG_VERSION __apple_build_version__
# endif
# elif defined(__GNUC__)
# ifdef __MINGW32__
# define C4_MINGW
# endif
# define C4_GCC
# if defined(__GNUC_PATCHLEVEL__)
# define C4_GCC_VERSION C4_VERSION_ENCODED(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
Expand Down
3 changes: 2 additions & 1 deletion 3rdparty/rapidyaml/include/c4/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ struct ScopedErrorSettings
/** source location */
struct srcloc;

C4CORE_EXPORT void handle_error(srcloc s, const char *fmt, ...);
// watchout: for VS the [[noreturn]] needs to come before other annotations like C4CORE_EXPORT
[[noreturn]] C4CORE_EXPORT void handle_error(srcloc s, const char *fmt, ...);
C4CORE_EXPORT void handle_warning(srcloc s, const char *fmt, ...);


Expand Down
33 changes: 33 additions & 0 deletions 3rdparty/rapidyaml/include/c4/ext/fast_float.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef _C4_EXT_FAST_FLOAT_HPP_
#define _C4_EXT_FAST_FLOAT_HPP_

#if defined(_MSC_VER) && !defined(__clang__)
# pragma warning(push)
# pragma warning(disable: 4365) // '=': conversion from 'const _Ty' to 'fast_float::limb', signed/unsigned mismatch
# pragma warning(disable: 4996) // snprintf/scanf: this function or variable may be unsafe
#elif defined(__clang__) || defined(__APPLE_CC__) || defined(_LIBCPP_VERSION)
# pragma clang diagnostic push
# if (defined(__clang_major__) && (__clang_major__ >= 9)) || defined(__APPLE_CC__)
# pragma clang diagnostic ignored "-Wfortify-source"
# endif
# pragma clang diagnostic ignored "-Wshift-count-overflow"
# pragma clang diagnostic ignored "-Wold-style-cast"
#elif defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnarrowing"
# pragma GCC diagnostic ignored "-Wconversion"
# pragma GCC diagnostic ignored "-Wuseless-cast"
# pragma GCC diagnostic ignored "-Wold-style-cast"
#endif

#include "c4/ext/fast_float_all.h"

#ifdef _MSC_VER
# pragma warning(pop)
#elif defined(__clang__) || defined(__APPLE_CC__)
# pragma clang diagnostic pop
#elif defined(__GNUC__)
# pragma GCC diagnostic pop
#endif

#endif // _C4_EXT_FAST_FLOAT_HPP_
Loading

0 comments on commit 7aca2c0

Please sign in to comment.