From 8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Sat, 29 Oct 2016 11:34:19 +0200 Subject: 8.4 --- zen/time.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'zen/time.h') diff --git a/zen/time.h b/zen/time.h index f9a0fcb5..04d841b5 100644 --- a/zen/time.h +++ b/zen/time.h @@ -1,8 +1,8 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * -// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * -// ************************************************************************** +// ***************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * +// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * +// ***************************************************************************** #ifndef TIME_H_8457092814324342453627 #define TIME_H_8457092814324342453627 @@ -214,7 +214,7 @@ struct PredefinedFormatTag {}; template inline String formatTime(const String2& format, const TimeComp& comp, UserDefinedFormatTag) //format as specified by "std::strftime", returns empty string on failure { - typedef typename GetCharType::Type CharType; + using CharType = typename GetCharType::Type; std::tm ctc = toClibTimeComponents(comp); std::mktime(&ctc); // unfortunately std::strftime() needs all elements of "struct tm" filled, e.g. tm_wday, tm_yday //note: although std::mktime() explicitly expects "local time", calculating weekday and day of year *should* be time-zone and DST independent @@ -227,7 +227,7 @@ String formatTime(const String2& format, const TimeComp& comp, UserDefinedFormat template inline String formatTime(FormatType, const TimeComp& comp, PredefinedFormatTag) { - typedef typename GetCharType::Type CharType; + using CharType = typename GetCharType::Type; return formatTime(GetFormat().format(CharType()), comp, UserDefinedFormatTag()); } } @@ -260,13 +260,13 @@ time_t localToTimeT(const TimeComp& comp) //returns -1 on error template inline String formatTime(const String2& format, const TimeComp& comp) { - typedef typename SelectIf< + using FormatTag = typename SelectIf< IsSameType::value || IsSameType::value || IsSameType::value || IsSameType::value || IsSameType::value || - IsSameType::value, implementation::PredefinedFormatTag, implementation::UserDefinedFormatTag>::Type FormatTag; + IsSameType::value, implementation::PredefinedFormatTag, implementation::UserDefinedFormatTag>::Type; return implementation::formatTime(format, comp, FormatTag()); } @@ -275,7 +275,7 @@ String formatTime(const String2& format, const TimeComp& comp) template bool parseTime(const String& format, const String2& str, TimeComp& comp) //return true on success { - typedef typename GetCharType::Type CharType; + using CharType = typename GetCharType::Type; static_assert(IsSameType::Type>::value, ""); const CharType* itFmt = strBegin(format); -- cgit