mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
astyle
This commit is contained in:
parent
40fc5becff
commit
6cc7e7382e
@ -38,7 +38,10 @@ inline spdlog::logger::logger(const std::string& logger_name, sinks_init_list si
|
||||
|
||||
// ctor with single sink
|
||||
inline spdlog::logger::logger(const std::string& logger_name, spdlog::sink_ptr single_sink):
|
||||
logger(logger_name, { single_sink })
|
||||
logger(logger_name,
|
||||
{
|
||||
single_sink
|
||||
})
|
||||
{}
|
||||
|
||||
|
||||
|
@ -372,10 +372,12 @@ namespace spdlog
|
||||
|
||||
inline std::string errno_to_string(char buf[256], int res)
|
||||
{
|
||||
if (res == 0) {
|
||||
if (res == 0)
|
||||
{
|
||||
return std::string(buf);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
return "Unknown error";
|
||||
}
|
||||
}
|
||||
@ -432,12 +434,14 @@ namespace spdlog
|
||||
};
|
||||
|
||||
const char *env_p = std::getenv("TERM");
|
||||
if (env_p == nullptr) {
|
||||
if (env_p == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static const bool result = std::any_of(
|
||||
std::begin(Terms), std::end(Terms), [&](const char* term) {
|
||||
std::begin(Terms), std::end(Terms), [&](const char* term)
|
||||
{
|
||||
return std::strstr(env_p, term) != nullptr;
|
||||
});
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user