diff --git a/include/spdlog/details/file_helper.h b/include/spdlog/details/file_helper.h index ef70d561..65b3560f 100644 --- a/include/spdlog/details/file_helper.h +++ b/include/spdlog/details/file_helper.h @@ -136,7 +136,7 @@ public: // treat casese like "/etc/rc.d/somelogfile or "/abc/.hiddenfile" auto folder_index = fname.rfind(details::os::folder_sep); - if (folder_index != fname.npos && folder_index >= ext_index - 1) + if (folder_index != filename_t::npos && folder_index >= ext_index - 1) { return std::make_tuple(fname, spdlog::filename_t()); } diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index adbfd16d..3988552a 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -112,7 +112,7 @@ public: void flush_every(std::chrono::seconds interval) { std::lock_guard lock(flusher_mutex_); - std::function clbk(std::bind(®istry::flush_all, this)); + std::function clbk = std::bind(®istry::flush_all, this); periodic_flusher_.reset(new periodic_worker(clbk, interval)); }