Remove deprecated fmt/time.h

This commit is contained in:
Victor Zverovich 2019-06-23 06:02:39 -07:00
parent 572b077dbf
commit b97e5d8c2a
3 changed files with 4 additions and 21 deletions

View File

@ -144,7 +144,7 @@ endfunction()
# Define the fmt library, its includes and the needed defines. # 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 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) set(FMT_SOURCES src/format.cc)
if (HAVE_OPEN) if (HAVE_OPEN)
add_headers(FMT_HEADERS posix.h) add_headers(FMT_HEADERS posix.h)

View File

@ -480,7 +480,9 @@ struct chrono_formatter {
std::chrono::duration<rep, Period>(val)); std::chrono::duration<rep, Period>(val));
} }
Rep hour() const { return mod((s.count() / 3600), 24); } Rep hour() const {
return static_cast<Rep>(mod((s.count() / 3600), 24));
}
Rep hour12() const { Rep hour12() const {
Rep hour = mod((s.count() / 3600), 12); Rep hour = mod((s.count() / 3600), 12);

View File

@ -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_