mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Code formatting
This commit is contained in:
parent
70bef682b0
commit
4e3e80109a
@ -192,10 +192,10 @@ void bench_default_api(int howmany, std::shared_ptr<spdlog::logger> log)
|
||||
|
||||
void bench_c_string(int howmany, std::shared_ptr<spdlog::logger> log)
|
||||
{
|
||||
const char *msg = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus " \
|
||||
"lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem " \
|
||||
"libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed " \
|
||||
"augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare " \
|
||||
const char *msg = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus "
|
||||
"lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem "
|
||||
"libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed "
|
||||
"augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare "
|
||||
"nisl, sit amet volutpat neque massa eu odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis.";
|
||||
using std::chrono::high_resolution_clock;
|
||||
auto orig_default = spdlog::default_logger();
|
||||
|
@ -147,7 +147,7 @@ void async_example()
|
||||
void binary_example()
|
||||
{
|
||||
std::vector<char> buf;
|
||||
for(int i = 0; i < 80; i++)
|
||||
for (int i = 0; i < 80; i++)
|
||||
{
|
||||
buf.push_back(static_cast<char>(i & 0xff));
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ template<size_t Buffer_Size>
|
||||
inline void append_string_view(fmt::string_view view, fmt::basic_memory_buffer<char, Buffer_Size> &dest)
|
||||
{
|
||||
auto *buf_ptr = view.data();
|
||||
if(buf_ptr != nullptr)
|
||||
if (buf_ptr != nullptr)
|
||||
{
|
||||
dest.append(buf_ptr, buf_ptr + view.size());
|
||||
}
|
||||
|
@ -218,7 +218,6 @@ inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *fmt, const
|
||||
wbuf_to_utf8buf(wbuf, buf);
|
||||
details::log_msg log_msg(&name_, lvl, to_string_view(buf));
|
||||
sink_it_(log_msg);
|
||||
|
||||
}
|
||||
SPDLOG_CATCH_AND_HANDLE
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user