time/Convert: add `noexcept`
This commit is contained in:
parent
e7411c0c4b
commit
80e55f6bfc
|
@ -69,7 +69,7 @@ LocalTime(std::chrono::system_clock::time_point tp)
|
|||
#ifdef __GLIBC__
|
||||
|
||||
std::chrono::system_clock::time_point
|
||||
TimeGm(struct tm &tm)
|
||||
TimeGm(struct tm &tm) noexcept
|
||||
{
|
||||
return std::chrono::system_clock::from_time_t(timegm(&tm));
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ TimeGm(struct tm &tm)
|
|||
#endif
|
||||
|
||||
std::chrono::system_clock::time_point
|
||||
MakeTime(struct tm &tm)
|
||||
MakeTime(struct tm &tm) noexcept
|
||||
{
|
||||
return std::chrono::system_clock::from_time_t(mktime(&tm));
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ LocalTime(std::chrono::system_clock::time_point tp);
|
|||
*/
|
||||
gcc_pure
|
||||
std::chrono::system_clock::time_point
|
||||
TimeGm(struct tm &tm);
|
||||
TimeGm(struct tm &tm) noexcept;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -65,6 +65,6 @@ TimeGm(struct tm &tm);
|
|||
*/
|
||||
gcc_pure
|
||||
std::chrono::system_clock::time_point
|
||||
MakeTime(struct tm &tm);
|
||||
MakeTime(struct tm &tm) noexcept;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue