refactor: got rid of FMT_RUNTIME() as it is not the part of C++20

This commit is contained in:
Mateusz Pusz committed 2021-11-08 18:37:37 +01:00
1 parent 212c9e05f2
commit 9f95799288
5 files changed
+9 -11

No files matched your search

+2 -2
View File
@@ -105,7 +105,7 @@ struct STD_FMT::formatter<geographic::latitude> : formatter<geographic::latitude
template<typename FormatContext>
auto format(geographic::latitude lat, FormatContext& ctx)
{
STD_FMT::format_to(ctx.out(), FMT_RUNTIME(lat.value() > 0 ? "N" : "S"));
STD_FMT::vformat_to(ctx.out(), lat.value() > 0 ? "N" : "S", {});
return formatter<geographic::latitude::value_type>::format(lat.value() > 0 ? lat.value() : -lat.value(), ctx);
}
};
@@ -115,7 +115,7 @@ struct STD_FMT::formatter<geographic::longitude> : formatter<geographic::longitu
template<typename FormatContext>
auto format(geographic::longitude lon, FormatContext& ctx)
{
STD_FMT::format_to(ctx.out(), FMT_RUNTIME(lon.value() > 0 ? "E" : "W"));
STD_FMT::vformat_to(ctx.out(), lon.value() > 0 ? "E" : "W", {});
return formatter<geographic::longitude::value_type>::format(lon.value() > 0 ? lon.value() : -lon.value(), ctx);
}
};
+2 -2
View File
@@ -184,7 +184,7 @@ struct STD_FMT::formatter<kalman::state<Qs...>> {
units::detail::quantity_global_format_specs<char> global_specs = { specs.fill, specs.align, specs.width };
units::detail::format_global_buffer(std::back_inserter(global_format_buffer), global_specs);
return STD_FMT::format_to(ctx.out(), FMT_RUNTIME(global_format_buffer), value_buffer);
return STD_FMT::vformat_to(ctx.out(), global_format_buffer, STD_FMT::make_format_args(value_buffer));
}
private:
units::detail::dynamic_format_specs<char> specs;
@@ -221,7 +221,7 @@ struct STD_FMT::formatter<kalman::estimation<Q>> {
units::detail::quantity_global_format_specs<char> global_specs = { specs.fill, specs.align, specs.width };
units::detail::format_global_buffer(std::back_inserter(global_format_buffer), global_specs);
return STD_FMT::format_to(ctx.out(), FMT_RUNTIME(global_format_buffer), value_buffer);
return STD_FMT::vformat_to(ctx.out(), global_format_buffer, STD_FMT::make_format_args(value_buffer));
}
private:
units::detail::dynamic_format_specs<char> specs;