From 4e1c17c7f3f69de7c3ea75168c0fded71e4cad52 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 16 Oct 2021 15:50:11 +0300 Subject: code simplification --- plugins/TabSRMM/src/msglog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 86706792ba..18e33c596e 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -373,13 +373,12 @@ static char* CreateRTFHeader(CMsgDialog *dat) static void AppendTimeStamp(wchar_t *szFinalTimestamp, int isSent, CMStringA &str, int skipFont, CMsgDialog *dat, int iFontIDOffset) { - if (skipFont) - AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->m_bIsHistory)); - else { - str.Append(GetRTFFont(isSent ? MSGFONTID_MYTIME + iFontIDOffset : MSGFONTID_YOURTIME + iFontIDOffset)); + if (!skipFont) { + str.Append(GetRTFFont(iFontIDOffset + (isSent ? MSGFONTID_MYTIME : MSGFONTID_YOURTIME))); str.AppendChar(' '); - AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->m_bIsHistory)); } + + AppendUnicodeToBuffer(str, szFinalTimestamp, MAKELONG(isSent, dat->m_bIsHistory)); } static wchar_t* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, wchar_t code) -- cgit v1.2.3