diff options
-rw-r--r-- | libc/src/stdio/printf_core/float_dec_converter.h | 12 | ||||
-rw-r--r-- | libc/src/stdio/printf_core/float_dec_converter_limited.h | 12 | ||||
-rw-r--r-- | libc/src/stdio/printf_core/float_hex_converter.h | 4 | ||||
-rw-r--r-- | libc/src/stdio/printf_core/parser.h | 11 |
4 files changed, 20 insertions, 19 deletions
diff --git a/libc/src/stdio/printf_core/float_dec_converter.h b/libc/src/stdio/printf_core/float_dec_converter.h index deeb566..1b0a02e 100644 --- a/libc/src/stdio/printf_core/float_dec_converter.h +++ b/libc/src/stdio/printf_core/float_dec_converter.h @@ -1137,8 +1137,8 @@ convert_float_dec_auto(Writer<write_mode> *writer, // TODO: unify the float converters to remove the duplicated checks for inf/nan. template <WriteMode write_mode> -int convert_float_decimal(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_decimal(Writer<write_mode> *writer, + const FormatSection &to_conv) { if (to_conv.length_modifier == LengthModifier::L) { fputil::FPBits<long double>::StorageType float_raw = to_conv.conv_val_raw; fputil::FPBits<long double> float_bits(float_raw); @@ -1159,8 +1159,8 @@ int convert_float_decimal(Writer<write_mode> *writer, } template <WriteMode write_mode> -int convert_float_dec_exp(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_dec_exp(Writer<write_mode> *writer, + const FormatSection &to_conv) { if (to_conv.length_modifier == LengthModifier::L) { fputil::FPBits<long double>::StorageType float_raw = to_conv.conv_val_raw; fputil::FPBits<long double> float_bits(float_raw); @@ -1181,8 +1181,8 @@ int convert_float_dec_exp(Writer<write_mode> *writer, } template <WriteMode write_mode> -int convert_float_dec_auto(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_dec_auto(Writer<write_mode> *writer, + const FormatSection &to_conv) { if (to_conv.length_modifier == LengthModifier::L) { fputil::FPBits<long double>::StorageType float_raw = to_conv.conv_val_raw; fputil::FPBits<long double> float_bits(float_raw); diff --git a/libc/src/stdio/printf_core/float_dec_converter_limited.h b/libc/src/stdio/printf_core/float_dec_converter_limited.h index 9804a38..d9af10d 100644 --- a/libc/src/stdio/printf_core/float_dec_converter_limited.h +++ b/libc/src/stdio/printf_core/float_dec_converter_limited.h @@ -687,20 +687,20 @@ LIBC_PRINTF_MODULAR_DECL int convert_float_dec_auto(Writer<write_mode> *writer, #ifdef LIBC_PRINTF_DEFINE_MODULAR template <WriteMode write_mode> -int convert_float_decimal(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_decimal(Writer<write_mode> *writer, + const FormatSection &to_conv) { return convert_float_outer(writer, to_conv, ConversionType::F); } template <WriteMode write_mode> -int convert_float_dec_exp(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_dec_exp(Writer<write_mode> *writer, + const FormatSection &to_conv) { return convert_float_outer(writer, to_conv, ConversionType::E); } template <WriteMode write_mode> -int convert_float_dec_auto(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_dec_auto(Writer<write_mode> *writer, + const FormatSection &to_conv) { return convert_float_outer(writer, to_conv, ConversionType::G); } #endif diff --git a/libc/src/stdio/printf_core/float_hex_converter.h b/libc/src/stdio/printf_core/float_hex_converter.h index fa72406..f1aa556 100644 --- a/libc/src/stdio/printf_core/float_hex_converter.h +++ b/libc/src/stdio/printf_core/float_hex_converter.h @@ -31,8 +31,8 @@ LIBC_PRINTF_MODULAR_DECL int convert_float_hex_exp(Writer<write_mode> *writer, #ifdef LIBC_PRINTF_DEFINE_MODULAR template <WriteMode write_mode> -int convert_float_hex_exp(Writer<write_mode> *writer, - const FormatSection &to_conv) { +LIBC_INLINE int convert_float_hex_exp(Writer<write_mode> *writer, + const FormatSection &to_conv) { using LDBits = fputil::FPBits<long double>; using StorageType = LDBits::StorageType; diff --git a/libc/src/stdio/printf_core/parser.h b/libc/src/stdio/printf_core/parser.h index 5a1eea3..f25e761 100644 --- a/libc/src/stdio/printf_core/parser.h +++ b/libc/src/stdio/printf_core/parser.h @@ -682,9 +682,9 @@ private: #ifdef LIBC_PRINTF_DEFINE_MODULAR template <typename ArgParser> -void Parser<ArgParser>::write_float_arg_val(FormatSection §ion, - LengthModifier lm, - size_t conv_index) { +LIBC_INLINE void Parser<ArgParser>::write_float_arg_val(FormatSection §ion, + LengthModifier lm, + size_t conv_index) { if (lm != LengthModifier::L) { WRITE_ARG_VAL_SIMPLEST(section.conv_val_raw, double, conv_index); } else { @@ -693,7 +693,7 @@ void Parser<ArgParser>::write_float_arg_val(FormatSection §ion, } template <typename ArgParser> -TypeDesc Parser<ArgParser>::float_type_desc(LengthModifier lm) { +LIBC_INLINE TypeDesc Parser<ArgParser>::float_type_desc(LengthModifier lm) { if (lm != LengthModifier::L) return type_desc_from_type<double>(); else @@ -701,7 +701,8 @@ TypeDesc Parser<ArgParser>::float_type_desc(LengthModifier lm) { } template <typename ArgParser> -bool Parser<ArgParser>::advance_arg_if_float(TypeDesc cur_type_desc) { +LIBC_INLINE bool +Parser<ArgParser>::advance_arg_if_float(TypeDesc cur_type_desc) { if (cur_type_desc == type_desc_from_type<double>()) args_cur.template next_var<double>(); else if (cur_type_desc == type_desc_from_type<long double>()) |