mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
fix vs2017 warning fmt::v5::localtime 'not all control paths return a value'.
This commit is contained in:
committed by
Victor Zverovich
parent
e4fea22d15
commit
674999c527
@ -58,6 +58,7 @@ inline std::tm localtime(std::time_t time) {
|
|||||||
return lt.tm_;
|
return lt.tm_;
|
||||||
// Too big time values may be unsupported.
|
// Too big time values may be unsupported.
|
||||||
FMT_THROW(format_error("time_t value out of range"));
|
FMT_THROW(format_error("time_t value out of range"));
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thread-safe replacement for std::gmtime
|
// Thread-safe replacement for std::gmtime
|
||||||
@ -93,6 +94,7 @@ inline std::tm gmtime(std::time_t time) {
|
|||||||
return gt.tm_;
|
return gt.tm_;
|
||||||
// Too big time values may be unsupported.
|
// Too big time values may be unsupported.
|
||||||
FMT_THROW(format_error("time_t value out of range"));
|
FMT_THROW(format_error("time_t value out of range"));
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
Reference in New Issue
Block a user