Bump fmt to version 8.1.1 and run clang-format

This commit is contained in:
gabime
2022-02-12 13:20:15 +02:00
parent d8199b607d
commit c432fdd987
11 changed files with 94 additions and 109 deletions

View File

@@ -199,8 +199,8 @@ void vector_example()
spdlog::info("Vector example: {}", vec);
}
#else
void vector_example() {}
#else
void vector_example() {}
#endif
// ! DSPDLOG_USE_STD_FORMAT
@@ -258,7 +258,8 @@ void multi_sink_example()
struct my_type
{
int i = 0;
explicit my_type(int i): i(i){};
explicit my_type(int i)
: i(i){};
};
namespace fmt_lib = spdlog::fmt_lib;
@@ -266,7 +267,7 @@ template<>
struct fmt_lib::formatter<my_type> : fmt_lib::formatter<std::string>
{
auto format(my_type my, format_context &ctx) -> decltype(ctx.out())
{
{
return fmt_lib::format_to(ctx.out(), "[my_type i={}]", my.i);
}
};
@@ -359,9 +360,9 @@ void replace_default_logger_example()
auto new_logger = spdlog::basic_logger_mt("new_default_logger", "logs/new-default-log.txt", true);
spdlog::set_default_logger(new_logger);
spdlog::set_level(spdlog::level::info);
spdlog::set_level(spdlog::level::info);
spdlog::debug("This message should not be displayed!");
spdlog::set_level(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::debug("This message should be displayed..");
spdlog::set_default_logger(old_logger);