diff --git a/CMakeLists.txt b/CMakeLists.txt index b58edf04..3ed14463 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,7 +144,7 @@ endfunction() # Define the fmt library, its includes and the needed defines. add_headers(FMT_HEADERS chrono.h color.h core.h format.h format-inl.h locale.h - ostream.h prepare.h printf.h time.h ranges.h) + ostream.h prepare.h printf.h ranges.h) set(FMT_SOURCES src/format.cc) if (HAVE_OPEN) add_headers(FMT_HEADERS posix.h) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 8f2e6385..a0e2f9b2 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -480,7 +480,9 @@ struct chrono_formatter { std::chrono::duration(val)); } - Rep hour() const { return mod((s.count() / 3600), 24); } + Rep hour() const { + return static_cast(mod((s.count() / 3600), 24)); + } Rep hour12() const { Rep hour = mod((s.count() / 3600), 12); diff --git a/include/fmt/time.h b/include/fmt/time.h deleted file mode 100644 index d15f9509..00000000 --- a/include/fmt/time.h +++ /dev/null @@ -1,19 +0,0 @@ -// Formatting library for C++ - time formatting -// -// Copyright (c) 2012 - present, Victor Zverovich -// All rights reserved. -// -// For the license information refer to format.h. - -#ifndef FMT_TIME_H_ -#define FMT_TIME_H_ - -#include "chrono.h" - -#ifdef _MSC_VER -# pragma message("fmt/time.h is deprecated, use fmt/chrono.h instead") -#else -# warning fmt/time.h is deprecated, use fmt/chrono.h instead -#endif - -#endif // FMT_TIME_H_