Accecpt iterators by value in logger ctor insted of ref

This commit is contained in:
gabime 2018-10-04 02:06:39 +03:00
parent 10000c383a
commit 102c31a04c
4 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ class async_logger final : public std::enable_shared_from_this<async_logger>, pu
public:
template<typename It>
async_logger(std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp,
async_logger(std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp,
async_overflow_policy overflow_policy = async_overflow_policy::block);
async_logger(std::string logger_name, sinks_init_list sinks_list, std::weak_ptr<details::thread_pool> tp,

View File

@ -16,7 +16,7 @@
template<typename It>
inline spdlog::async_logger::async_logger(
std::string logger_name, const It &begin, const It &end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
std::string logger_name, It begin, It end, std::weak_ptr<details::thread_pool> tp, async_overflow_policy overflow_policy)
: logger(std::move(logger_name), begin, end)
, thread_pool_(tp)
, overflow_policy_(overflow_policy)

View File

@ -13,7 +13,7 @@
// create logger with given name, sinks and the default pattern formatter
// all other ctors will call this one
template<typename It>
inline spdlog::logger::logger(std::string logger_name, const It &begin, const It &end)
inline spdlog::logger::logger(std::string logger_name, It begin, It end)
: name_(std::move(logger_name))
, sinks_(begin, end)
, level_(level::info)

View File

@ -36,7 +36,7 @@ public:
logger(std::string name, sinks_init_list sinks);
template<typename It>
logger(std::string name, const It &begin, const It &end);
logger(std::string name, It begin, It end);
virtual ~logger();