fixed gcc pedantic warnings
This commit is contained in:
parent
4cb6aa90b2
commit
6cda714e4a
@ -29,7 +29,7 @@
|
|||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
|
|
||||||
int main_(int, char* [])
|
int main(int, char* [])
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace spd = spdlog;
|
namespace spd = spdlog;
|
||||||
|
@ -57,8 +57,8 @@ protected:
|
|||||||
void _stop() override;
|
void _stop() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<sinks::async_sink> _as;
|
|
||||||
log_clock::duration _shutdown_duration;
|
log_clock::duration _shutdown_duration;
|
||||||
|
std::unique_ptr<sinks::async_sink> _as;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,15 +35,15 @@
|
|||||||
|
|
||||||
|
|
||||||
template<class It>
|
template<class It>
|
||||||
inline spdlog::async_logger::async_logger(const std::string& name, const It& begin, const It& end, size_t queue_size, const log_clock::duration& shutdown_duration) :
|
inline spdlog::async_logger::async_logger(const std::string& logger_name, const It& begin, const It& end, size_t queue_size, const log_clock::duration& shutdown_duration) :
|
||||||
logger(name, begin, end),
|
logger(logger_name, begin, end),
|
||||||
_shutdown_duration(shutdown_duration),
|
_shutdown_duration(shutdown_duration),
|
||||||
_as(std::unique_ptr<sinks::async_sink>(new sinks::async_sink(queue_size)))
|
_as(std::unique_ptr<sinks::async_sink>(new sinks::async_sink(queue_size)))
|
||||||
{
|
{
|
||||||
_as->set_formatter(_formatter);
|
_as->set_formatter(_formatter);
|
||||||
for (auto &s : _sinks)
|
for (auto &s : _sinks)
|
||||||
_as->add_sink(s);
|
_as->add_sink(s);
|
||||||
};
|
}
|
||||||
|
|
||||||
inline spdlog::async_logger::async_logger(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const log_clock::duration& shutdown_duration) :
|
inline spdlog::async_logger::async_logger(const std::string& logger_name, sinks_init_list sinks, size_t queue_size, const log_clock::duration& shutdown_duration) :
|
||||||
async_logger(logger_name, sinks.begin(), sinks.end(), queue_size, shutdown_duration) {}
|
async_logger(logger_name, sinks.begin(), sinks.end(), queue_size, shutdown_duration) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user