mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
clang-format
This commit is contained in:
parent
d5c05e51af
commit
99d769db5b
@ -618,7 +618,8 @@ typedef struct {
|
|||||||
} lib_symbol;
|
} lib_symbol;
|
||||||
|
|
||||||
#define lib_nelems(x) (sizeof(x) / sizeof((x)[0]))
|
#define lib_nelems(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
#define lib_symbol_def(name) {#name, (void **)&name}
|
#define lib_symbol_def(name) \
|
||||||
|
{ #name, (void **)&name }
|
||||||
|
|
||||||
static const lib_symbol lib_symbols_kperf[] = {
|
static const lib_symbol lib_symbols_kperf[] = {
|
||||||
lib_symbol_def(kpc_pmu_version),
|
lib_symbol_def(kpc_pmu_version),
|
||||||
|
|||||||
@ -78,14 +78,15 @@ template <typename UC> struct parse_options_t {
|
|||||||
FASTFLOAT_CONSTEXPR20 explicit parse_options_t(
|
FASTFLOAT_CONSTEXPR20 explicit parse_options_t(
|
||||||
chars_format const fmt = chars_format::general, UC const dot = UC('.'),
|
chars_format const fmt = chars_format::general, UC const dot = UC('.'),
|
||||||
chars_format_t const b = 10) noexcept
|
chars_format_t const b = 10) noexcept
|
||||||
: format(fmt), decimal_point(dot), base(b) {
|
: format(fmt), decimal_point(dot),
|
||||||
|
base(b){
|
||||||
#ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
#ifdef FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN
|
||||||
// static_assert(b >= 2 && b <= 36);
|
// static_assert(b >= 2 && b <= 36);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Which number formats are accepted */
|
/** Which number formats are accepted */
|
||||||
chars_format const format;
|
chars_format const format;
|
||||||
/** The character used as decimal point */
|
/** The character used as decimal point */
|
||||||
UC const decimal_point;
|
UC const decimal_point;
|
||||||
/** The base used for integers */
|
/** The base used for integers */
|
||||||
|
|||||||
@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) {
|
|||||||
class RandomEngine {
|
class RandomEngine {
|
||||||
public:
|
public:
|
||||||
RandomEngine() = delete;
|
RandomEngine() = delete;
|
||||||
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {};
|
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){};
|
||||||
|
|
||||||
uint64_t next() {
|
uint64_t next() {
|
||||||
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h
|
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h
|
||||||
|
|||||||
@ -54,7 +54,7 @@ float cygwin_strtof_l(char const *start, char **end) {
|
|||||||
class RandomEngine {
|
class RandomEngine {
|
||||||
public:
|
public:
|
||||||
RandomEngine() = delete;
|
RandomEngine() = delete;
|
||||||
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed) {};
|
RandomEngine(uint64_t new_seed) : wyhash64_x_(new_seed){};
|
||||||
|
|
||||||
uint64_t next() {
|
uint64_t next() {
|
||||||
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h
|
// Adapted from https://github.com/wangyi-fudan/wyhash/blob/master/wyhash.h
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user