From 842e5236e4022db7670163bde75444098adab689 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 Jul 2016 17:58:09 +0300 Subject: [PATCH] Fixed possible name collision with boost chrono --- include/spdlog/sinks/file_sinks.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/spdlog/sinks/file_sinks.h b/include/spdlog/sinks/file_sinks.h index bdc6ec9f..3eb03b0b 100644 --- a/include/spdlog/sinks/file_sinks.h +++ b/include/spdlog/sinks/file_sinks.h @@ -214,9 +214,8 @@ protected: private: std::chrono::system_clock::time_point _next_rotation_tp() - { - using namespace std::chrono; - auto now = system_clock::now(); + { + auto now = std::chrono::system_clock::now(); time_t tnow = std::chrono::system_clock::to_time_t(now); tm date = spdlog::details::os::localtime(tnow); date.tm_hour = _rotation_h; @@ -226,7 +225,7 @@ private: if (rotation_time > now) return rotation_time; else - return system_clock::time_point(rotation_time + hours(24)); + return std::chrono::system_clock::time_point(rotation_time + std::chrono::hours(24)); } filename_t _base_filename;