1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-03-31 18:32:40 +08:00

clang format

This commit is contained in:
gabime 2018-09-25 01:11:36 +03:00
parent 41d879e292
commit 808bc1f4ed
4 changed files with 39 additions and 38 deletions

View File

@ -54,7 +54,6 @@ int main(int argc, char *argv[])
cout << "******************************************************************" cout << "******************************************************************"
"*************\n"; "*************\n";
bench(howmany, spdlog::create<null_sink_st>("null_st")); bench(howmany, spdlog::create<null_sink_st>("null_st"));
return 0; return 0;

View File

@ -174,7 +174,6 @@ void binary_example()
// logger->info("uppercase: {:X}", spdlog::to_hex(buf)); // logger->info("uppercase: {:X}", spdlog::to_hex(buf));
// logger->info("uppercase, no delimiters: {:Xs}", spdlog::to_hex(buf)); // logger->info("uppercase, no delimiters: {:Xs}", spdlog::to_hex(buf));
// logger->info("uppercase, no delimiters, no position info: {:Xsp}", spdlog::to_hex(buf)); // logger->info("uppercase, no delimiters, no position info: {:Xsp}", spdlog::to_hex(buf));
} }
// create logger with 2 targets with different log levels and formats // create logger with 2 targets with different log levels and formats

View File

@ -21,7 +21,6 @@
// char buf[128]; // char buf[128];
// logger->info("Some buffer {:X}", spdlog::to_hex(std::begin(buf), std::end(buf))); // logger->info("Some buffer {:X}", spdlog::to_hex(std::begin(buf), std::end(buf)));
namespace spdlog { namespace spdlog {
namespace details { namespace details {
@ -30,15 +29,22 @@ class bytes_range
{ {
public: public:
bytes_range(It range_begin, It range_end) bytes_range(It range_begin, It range_end)
: begin_(range_begin), end_(range_end) : begin_(range_begin)
{} , end_(range_end)
{
}
It begin() const {return begin_;} It begin() const
It end() const {return end_;} {
return begin_;
}
It end() const
{
return end_;
}
private: private:
It begin_, end_; It begin_, end_;
}; };
} // namespace details } // namespace details
@ -58,7 +64,6 @@ inline details::bytes_range<It> to_hex(const It range_begin, const It range_end)
return details::bytes_range<It>(range_begin, range_end); return details::bytes_range<It>(range_begin, range_end);
} }
} // namespace spdlog } // namespace spdlog
namespace fmt { namespace fmt {

View File

@ -135,8 +135,6 @@ TEST_CASE("clone async", "[clone]")
spdlog::drop_all(); spdlog::drop_all();
} }
#include "spdlog/fmt/bin_to_hex.h" #include "spdlog/fmt/bin_to_hex.h"
TEST_CASE("to_hex", "[to_hex]") TEST_CASE("to_hex", "[to_hex]")