mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Fix dummy warnings
This commit is contained in:
parent
fecb2d6f0d
commit
645c76a9a5
@ -56,11 +56,10 @@ inline std::tm localtime(std::time_t time) {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
dispatcher lt(time);
|
dispatcher lt(time);
|
||||||
if (lt.run())
|
|
||||||
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"));
|
if (!lt.run())
|
||||||
return {};
|
FMT_THROW(format_error("time_t value out of range"));
|
||||||
|
return lt.tm_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thread-safe replacement for std::gmtime
|
// Thread-safe replacement for std::gmtime
|
||||||
@ -94,11 +93,10 @@ inline std::tm gmtime(std::time_t time) {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
dispatcher gt(time);
|
dispatcher gt(time);
|
||||||
if (gt.run())
|
|
||||||
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"));
|
if (!gt.run())
|
||||||
return {};
|
FMT_THROW(format_error("time_t value out of range"));
|
||||||
|
return gt.tm_;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
Loading…
Reference in New Issue
Block a user