Index: src/ch/AboutDlg.cpp =================================================================== diff -u -r8068e0c351055554340ac9755d1bc846893bf2b8 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/AboutDlg.cpp (.../AboutDlg.cpp) (revision 8068e0c351055554340ac9755d1bc846893bf2b8) +++ src/ch/AboutDlg.cpp (.../AboutDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -81,7 +81,7 @@ fmt.SetParam(_T("%langname"), pLangData->GetLangName()); fmt.SetParam(_T("%authors"), pLangData->GetAuthor()); - pctlLanguage->SetWindowText(fmt); + pctlLanguage->SetWindowText(fmt.ToString()); } } Index: src/ch/BufferSizeDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/BufferSizeDlg.cpp (.../BufferSizeDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/BufferSizeDlg.cpp (.../BufferSizeDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -134,6 +134,9 @@ GetDlgItem(IDC_LANSIZE_EDIT)->SetFocus(); static_cast(GetDlgItem(IDC_LANSIZE_EDIT))->SetSel(0, -1); break; + case chengine::TBufferSizes::eBuffer_Last: + default: + break; } return FALSE; Index: src/ch/ClipboardMonitor.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -179,7 +179,7 @@ // some kind of error ictranslate::CFormat fmt(GetResManager().LoadString(IDS_SHUTDOWNERROR_STRING)); fmt.SetParam(_T("%errno"), GetLastError()); - AfxMessageBox(fmt, MB_ICONERROR | MB_OK | MB_SYSTEMMODAL); + AfxMessageBox(fmt.ToString(), MB_ICONERROR | MB_OK | MB_SYSTEMMODAL); } } } Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -481,25 +481,25 @@ fmt.SetFormat(GetResManager().LoadString(IDS_BSEDEFAULT_STRING)); fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetDefaultSize(), true)); - m_ctlBufferSizes.AddString(fmt); + m_ctlBufferSizes.AddString(fmt.ToString()); if (!bsSizes.IsOnlyDefault()) { fmt.SetFormat(GetResManager().LoadString(IDS_BSEONEDISK_STRING)); fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetOneDiskSize(), true)); - m_ctlBufferSizes.AddString(fmt); + m_ctlBufferSizes.AddString(fmt.ToString()); fmt.SetFormat(GetResManager().LoadString(IDS_BSETWODISKS_STRING)); fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetTwoDisksSize(), true)); - m_ctlBufferSizes.AddString(fmt); + m_ctlBufferSizes.AddString(fmt.ToString()); fmt.SetFormat(GetResManager().LoadString(IDS_BSECD_STRING)); fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetCDSize(), true)); - m_ctlBufferSizes.AddString(fmt); + m_ctlBufferSizes.AddString(fmt.ToString()); fmt.SetFormat(GetResManager().LoadString(IDS_BSELAN_STRING)); fmt.SetParam(_T("%size"), GetSizeString(bsSizes.GetLANSize(), true)); - m_ctlBufferSizes.AddString(fmt); + m_ctlBufferSizes.AddString(fmt.ToString()); } } @@ -949,7 +949,7 @@ // report ictranslate::CFormat fmt(GetResManager().LoadString(IDS_IMPORTREPORT_STRING)); fmt.SetParam(_T("%count"), uiCount); - AfxMessageBox(fmt); + AfxMessageBox(fmt.ToString()); } } @@ -998,7 +998,7 @@ fmt.SetFormat(GetResManager().LoadString(IDS_EXPORTING_TASK_FAILED)); fmt.SetParam(_T("%reason"), strError); - AfxMessageBox(fmt, MB_OK | MB_ICONERROR); + AfxMessageBox(fmt.ToString(), MB_OK | MB_ICONERROR); } } } Index: src/ch/DirTreeCtrl.cpp =================================================================== diff -u -rb26ced3298e3e7e51d91f3ac70b56746786da83b -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/DirTreeCtrl.cpp (.../DirTreeCtrl.cpp) (revision b26ced3298e3e7e51d91f3ac70b56746786da83b) +++ src/ch/DirTreeCtrl.cpp (.../DirTreeCtrl.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -720,7 +720,7 @@ // get interface IQueryInfo *pqi; - if (psid->lpsfParent->GetUIObjectOf(this->GetSafeHwnd(), 1, (const struct _ITEMIDLIST**)&psid->lpiidlRelative, IID_IQueryInfo, 0, (void**)&pqi) != NOERROR) + if (psid->lpsfParent->GetUIObjectOf(this->GetSafeHwnd(), 1, (const struct _ITEMIDLIST**)&psid->lpiidlRelative, IID_IQueryInfo, nullptr, (void**)&pqi) != NOERROR) return false; // get tip Index: src/ch/FeedbackFileErrorDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -74,7 +74,7 @@ fmt.SetParam(_T("%dstfilename"), m_strDstPath); fmt.SetParam(_T("%reason"), strError.c_str()); - m_ctlErrorInfo.SetWindowText(fmt); + m_ctlErrorInfo.SetWindowText(fmt.ToString()); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE Index: src/ch/FeedbackNotEnoughSpaceDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -72,7 +72,7 @@ CWnd* pWnd=GetDlgItem(IDC_HEADER_STATIC); if (pWnd) - pWnd->SetWindowText(fmt); + pWnd->SetWindowText(fmt.ToString()); // now the sizes pWnd=GetDlgItem(IDC_REQUIRED_STATIC); Index: src/ch/FeedbackReplaceDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -119,20 +119,20 @@ strTemplate = rManager.LoadString(IDS_INFO_PATH_STRING); ictranslate::CFormat fmt(strTemplate); fmt.SetParam(_T("%pathname"), pathSrc.GetParent().ToString()); - m_ctlSrcPath.SetWindowText(fmt); + m_ctlSrcPath.SetWindowText(fmt.ToString()); // size strTemplate = rManager.LoadString(IDS_INFO_SIZE_STRING); fmt.SetFormat(strTemplate); fmt.SetParam(_T("%size"), m_rSrcFile.GetLength64()); - m_ctlSrcSize.SetWindowText(fmt); + m_ctlSrcSize.SetWindowText(fmt.ToString()); // modified date strTemplate = rManager.LoadString(IDS_INFO_MODIFIED_STRING); fmt.SetFormat(strTemplate); COleDateTime dtTemp = m_rSrcFile.GetLastWriteTime().GetAsFiletime(); fmt.SetParam(_T("%datemod"), dtTemp.Format(LOCALE_NOUSEROVERRIDE, LANG_USER_DEFAULT)); - m_ctlSrcDate.SetWindowText(fmt); + m_ctlSrcDate.SetWindowText(fmt.ToString()); ///////////////////////////////////////////////////////////// // dst file @@ -145,20 +145,20 @@ strTemplate = rManager.LoadString(IDS_INFO_PATH_STRING); fmt.SetFormat(strTemplate); fmt.SetParam(_T("%pathname"), pathDst.GetParent().ToString()); - m_ctlDstPath.SetWindowText(fmt); + m_ctlDstPath.SetWindowText(fmt.ToString()); // size strTemplate = rManager.LoadString(IDS_INFO_SIZE_STRING); fmt.SetFormat(strTemplate); fmt.SetParam(_T("%size"), m_rDstFile.GetLength64()); - m_ctlDstSize.SetWindowText(fmt); + m_ctlDstSize.SetWindowText(fmt.ToString()); // modified date strTemplate = rManager.LoadString(IDS_INFO_MODIFIED_STRING); fmt.SetFormat(strTemplate); dtTemp = m_rDstFile.GetLastWriteTime().GetAsFiletime(); fmt.SetParam(_T("%datemod"), dtTemp.Format(LOCALE_NOUSEROVERRIDE, LANG_USER_DEFAULT)); - m_ctlDstDate.SetWindowText(fmt); + m_ctlDstDate.SetWindowText(fmt.ToString()); // button captions CWnd* pAppendButton = GetDlgItem(IDC_COPY_REST_BUTTON); Index: src/ch/FolderDialog.cpp =================================================================== diff -u -r847d6d10ae5b9a694b9b54d3b66051239d5cbea9 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 847d6d10ae5b9a694b9b54d3b66051239d5cbea9) +++ src/ch/FolderDialog.cpp (.../FolderDialog.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -200,7 +200,7 @@ CRect rc(0, 0, 0, 0); if (!m_ctlTitle.Create(_T(""), WS_CHILD | WS_VISIBLE, rc, this, IDC_TITLE_STATIC) || - (__g_pfStatic=(WNDPROC)SetWindowLongPtr(m_ctlTitle.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == 0) + (__g_pfStatic=(WNDPROC)SetWindowLongPtr(m_ctlTitle.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == nullptr) { TRACE("Error creating control..."); return -1; @@ -245,7 +245,7 @@ // listview if (!m_ctlShortcuts.Create(WS_CHILD | WS_VISIBLE | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_EDITLABELS | WS_TABSTOP | LVS_SMALLICON | LVS_SHOWSELALWAYS, rc, this, IDC_SHORTCUT_LIST) || - (__g_pfList=(WNDPROC)SetWindowLongPtr(m_ctlShortcuts.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == 0) + (__g_pfList=(WNDPROC)SetWindowLongPtr(m_ctlShortcuts.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == nullptr) { TRACE("Error creating control..."); return -1; @@ -266,22 +266,22 @@ // combobox rc.bottom=rc.top+200; if (!m_ctlPath.Create(WS_CHILD | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN | CBS_SORT | CBS_OWNERDRAWFIXED | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rc, this, IDC_PATH_COMBOBOXEX) || - (__g_pfCombo=(WNDPROC)SetWindowLongPtr(m_ctlPath.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == 0) + (__g_pfCombo=(WNDPROC)SetWindowLongPtr(m_ctlPath.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == nullptr) { TRACE("Error creating control..."); return -1; } HWND hCombo=(HWND)m_ctlPath.SendMessage(CBEM_GETCOMBOCONTROL, 0, 0); - if ((__g_pfBaseCombo=(WNDPROC)SetWindowLongPtr(hCombo, GWLP_WNDPROC, (LONG_PTR)ComboWindowProc)) == 0) + if ((__g_pfBaseCombo=(WNDPROC)SetWindowLongPtr(hCombo, GWLP_WNDPROC, (LONG_PTR)ComboWindowProc)) == nullptr) return -1; HWND hEdit=(HWND)m_ctlPath.SendMessage(CBEM_GETEDITCONTROL, 0, 0); - if ((__g_pfEdit=(WNDPROC)SetWindowLongPtr(hEdit, GWLP_WNDPROC, (LONG_PTR)EditWindowProc)) == 0) + if ((__g_pfEdit=(WNDPROC)SetWindowLongPtr(hEdit, GWLP_WNDPROC, (LONG_PTR)EditWindowProc)) == nullptr) return -1; // buttons OK & Cancel rc.bottom=rc.top; if (!m_ctlOk.Create(_T(""), WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON, rc, this, IDOK) || - (__g_pfButton=(WNDPROC)SetWindowLongPtr(m_ctlOk.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == 0) + (__g_pfButton=(WNDPROC)SetWindowLongPtr(m_ctlOk.GetSafeHwnd(), GWLP_WNDPROC, (LONG_PTR)CustomWindowProc)) == nullptr) { TRACE("Error creating control..."); return -1; @@ -883,7 +883,7 @@ SHGetFileInfo(sc.m_strPath, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX | SHGFI_LARGEICON); // add to an array and to shortcuts list - m_bdData.cvShortcuts.push_back(sc); + m_bdData.cvShortcuts.push_back(sc.ToString()); int iIndex = boost::numeric_cast(m_bdData.cvShortcuts.size() - 1); m_ctlShortcuts.InsertItem(iIndex, sc.m_strName, sfi.iIcon); m_ctlShortcuts.SetItem(iIndex, 1, LVIF_TEXT, sc.m_strPath, 0, 0, 0, 0); @@ -940,7 +940,7 @@ CShortcut sc=CShortcut(m_bdData.cvShortcuts.at(pdi->item.iItem)); sc.m_strName=pdi->item.pszText; - m_bdData.cvShortcuts[pdi->item.iItem] = (CString)sc; + m_bdData.cvShortcuts[pdi->item.iItem] = sc.ToString(); *pResult=1; } Index: src/ch/MainWnd.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -410,7 +410,7 @@ fmt.SetFormat(GetResManager().LoadString(IDS_FINALIZE_CH_ERROR)); fmt.SetParam(_T("%reason"), strMessage); - AfxMessageBox(fmt, MB_OK | MB_ICONERROR); + AfxMessageBox(fmt.ToString(), MB_OK | MB_ICONERROR); } CWnd::OnClose(); @@ -436,7 +436,7 @@ fmt.SetFormat(_T("Failed to autosave task. Error: %err.")); fmt.SetParam(_T("%err"), (PCTSTR)strError); - LOG_ERROR(m_spLog) << fmt; + LOG_ERROR(m_spLog) << fmt.ToString(); } SetTimer(eTimer_Autosave, GetPropValue(GetConfig()), nullptr); @@ -519,11 +519,11 @@ fmt.SetParam(_T("%xml"), wstrData.c_str()); fmt.SetParam(_T("%err"), (PCTSTR)strError); - LOG_ERROR(m_spLog) << fmt; + LOG_ERROR(m_spLog) << fmt.ToString(); fmt.SetFormat(GetResManager().LoadString(IDS_SHELLEXT_XML_IMPORT_FAILED)); fmt.SetParam(_T("%err"), (PCTSTR)strError); - AfxMessageBox(fmt, MB_OK | MB_ICONERROR); + AfxMessageBox(fmt.ToString(), MB_OK | MB_ICONERROR); break; } @@ -627,11 +627,11 @@ fmt.SetParam(_T("%path"), strPath.ToString()); fmt.SetParam(_T("%err"), szBuffer.get()); - LOG_ERROR(m_spLog) << fmt; + LOG_ERROR(m_spLog) << fmt.ToString(); fmt.SetFormat(GetResManager().LoadString(IDS_TASK_IMPORT_FAILED)); fmt.SetParam(_T("%path"), strPath.ToString()); - AfxMessageBox(fmt, MB_OK | MB_ICONERROR); + AfxMessageBox(fmt.ToString(), MB_OK | MB_ICONERROR); } } } Index: src/ch/ShortcutsDlg.cpp =================================================================== diff -u -r8068e0c351055554340ac9755d1bc846893bf2b8 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/ShortcutsDlg.cpp (.../ShortcutsDlg.cpp) (revision 8068e0c351055554340ac9755d1bc846893bf2b8) +++ src/ch/ShortcutsDlg.cpp (.../ShortcutsDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -236,7 +236,7 @@ m_ctlPath.GetWindowText(sc.m_strPath); // add to an array - m_cvShortcuts.push_back((CString)sc); + m_cvShortcuts.push_back(sc.ToString()); // add with an icon SHFILEINFO sfi; @@ -262,7 +262,7 @@ m_ctlPath.GetWindowText(sc.m_strPath); // array update - m_cvShortcuts[iPos] = (CString)sc; + m_cvShortcuts[iPos] = sc.ToString(); // list SHFILEINFO sfi; Index: src/ch/StatusDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -739,7 +739,7 @@ ictranslate::CFormat fmt(GetResManager().LoadString(IDS_SHELLEXECUTEERROR_STRING)); fmt.SetParam(_T("%errno"), hResult); fmt.SetParam(_T("%path"), spTask->GetLogPath().ToString()); - AfxMessageBox(fmt); + AfxMessageBox(fmt.ToString()); } } Index: src/ch/TTaskManagerWrapper.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/TTaskManagerWrapper.cpp (.../TTaskManagerWrapper.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/TTaskManagerWrapper.cpp (.../TTaskManagerWrapper.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -63,7 +63,7 @@ fmt.SetFormat(rResourceManager.LoadString(IDS_TASK_CREATE_FAILED)); fmt.SetParam(_T("%reason"), strMessage); - AfxMessageBox(fmt, MB_OK | MB_ICONERROR); + AfxMessageBox(fmt.ToString(), MB_OK | MB_ICONERROR); return nullptr; } Index: src/ch/UpdateVersionInfo.cpp =================================================================== diff -u -rd9527df01ee91b35d9a5fdccb80ded25a9c8265f -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/UpdateVersionInfo.cpp (.../UpdateVersionInfo.cpp) (revision d9527df01ee91b35d9a5fdccb80ded25a9c8265f) +++ src/ch/UpdateVersionInfo.cpp (.../UpdateVersionInfo.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -18,9 +18,9 @@ // ============================================================================ #include "stdafx.h" #include "UpdateVersionInfo.h" -#include +#include #include -#include +#include #include UpdateVersionInfo::UpdateVersionInfo(const std::wstring& strNumericVersion, const std::wstring& strReadableVersion, boost::gregorian::date dateRelease, const std::wstring& strDownloadLink, const std::wstring& strReleaseNotes) : Index: src/ch/UpdaterDlg.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/UpdaterDlg.cpp (.../UpdaterDlg.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/UpdaterDlg.cpp (.../UpdaterDlg.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -180,15 +180,15 @@ fmt.SetParam(_T("%officialver"), m_ucChecker.GetReadableVersion()); fmt.SetParam(L"%reldate", m_ucChecker.GetReleaseDate()); - CString strEntireText = (PCTSTR)fmt; + CString strEntireText = fmt.ToString(); CString strReleaseNotes = m_ucChecker.GetReleaseNotes(); strReleaseNotes = strReleaseNotes.Trim(); if(!strReleaseNotes.IsEmpty()) { fmt.SetFormat(L"\n\n%relnoteshdr\n%relnotestxt"); fmt.SetParam(L"%relnoteshdr", rResManager.LoadString(IDS_UPDATER_RELEASENOTES)); fmt.SetParam(L"%relnotestxt", m_ucChecker.GetReleaseNotes()); - strEntireText += fmt; + strEntireText += fmt.ToString(); } UpdateSecondaryText(strEntireText); Index: src/ch/ch.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/ch.cpp (.../ch.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/ch.cpp (.../ch.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -627,6 +627,9 @@ case eFailure: MsgBox(IDS_UNREGISTERERR_STRING, MB_ICONERROR | MB_OK); break; + case eSuccessNeedRestart: + default: + break; } } Index: src/ch/shortcuts.cpp =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/shortcuts.cpp (.../shortcuts.cpp) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/shortcuts.cpp (.../shortcuts.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -42,7 +42,7 @@ FromString(strText); } -CShortcut::operator CString() +CString CShortcut::ToString() const { if (m_strPath.IsEmpty()) return _T(""); Index: src/ch/shortcuts.h =================================================================== diff -u -r541304f4e098b4c7617b718287ab40646d5deb92 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/ch/shortcuts.h (.../shortcuts.h) (revision 541304f4e098b4c7617b718287ab40646d5deb92) +++ src/ch/shortcuts.h (.../shortcuts.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -24,7 +24,8 @@ public: CShortcut() { } explicit CShortcut(const CString& strText); - operator CString(); + + CString ToString() const; bool FromString(const CString& strText); Index: src/common/TShellExtMenuConfig.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/common/TShellExtMenuConfig.cpp (.../TShellExtMenuConfig.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/common/TShellExtMenuConfig.cpp (.../TShellExtMenuConfig.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -26,7 +26,6 @@ #include #include #include -#include "../libchengine/TConfig.h" #include "../libchengine/TConfigArray.h" using namespace chcore; Index: src/libchcore/libchcore.h =================================================================== diff -u -re96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libchcore/libchcore.h (.../libchcore.h) (revision e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3) +++ src/libchcore/libchcore.h (.../libchcore.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -1,3 +1,24 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __LIBCHCORE_H__ +#define __LIBCHCORE_H__ + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LIBCHCORE_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project @@ -19,3 +40,5 @@ */ #define LIBCHCORE_API #endif + +#endif Index: src/libchengine/TSharedCount.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libchengine/TSharedCount.h (.../TSharedCount.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TSharedCount.h (.../TSharedCount.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -37,7 +37,7 @@ TSharedCount& operator=(const TSharedCount& rSrc) = delete; // conversion from/to T - operator T() const + explicit operator T() const { return GetValue(); } Index: src/libchengine/TSharedCountMT.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libchengine/TSharedCountMT.h (.../TSharedCountMT.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TSharedCountMT.h (.../TSharedCountMT.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -39,7 +39,7 @@ TSharedCountMT& operator=(const TSharedCountMT& rSrc) = delete; // conversion from/to T - operator T() const + explicit operator T() const { return GetValue(); } Index: src/libchengine/TSubTaskStatsSnapshot.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libchengine/TSubTaskStatsSnapshot.cpp (.../TSubTaskStatsSnapshot.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TSubTaskStatsSnapshot.cpp (.../TSubTaskStatsSnapshot.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -45,7 +45,7 @@ m_fcCurrentIndex(0), m_eSubOperationType(eSubOperation_None), m_iCurrentBufferIndex(TBufferSizes::eBuffer_Default), - m_strCurrentPath(0), + m_strCurrentPath(), m_timeElapsed(0) { } @@ -58,7 +58,7 @@ m_fcTotalCount = 0; m_fcProcessedCount = 0; m_iCurrentBufferIndex = TBufferSizes::eBuffer_Default; - m_strCurrentPath = 0; + m_strCurrentPath.Clear(); m_timeElapsed = 0; m_dSizeSpeed = 0; m_dCountSpeed = 0; Index: src/libchengine/libchengine.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libchengine/libchengine.h (.../libchengine.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/libchengine.h (.../libchengine.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -1,3 +1,24 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __LIBCHENGINE_H__ +#define __LIBCHENGINE_H__ + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LIBCHENGINE_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project @@ -19,3 +40,5 @@ */ #define LIBCHENGINE_API #endif + +#endif Index: src/libictranslate/LanguageDialog.h =================================================================== diff -u -r541304f4e098b4c7617b718287ab40646d5deb92 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libictranslate/LanguageDialog.h (.../LanguageDialog.h) (revision 541304f4e098b4c7617b718287ab40646d5deb92) +++ src/libictranslate/LanguageDialog.h (.../LanguageDialog.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -118,7 +118,7 @@ TCHAR *m_pszClass = nullptr; WORD m_wTitle = 0; - TCHAR *m_pszTitle = 0; + TCHAR *m_pszTitle = nullptr; WORD m_wCreationDataSize = 0; BYTE *m_pbyCreationData = nullptr; Index: src/libictranslate/ResourceManager.h =================================================================== diff -u -r541304f4e098b4c7617b718287ab40646d5deb92 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision 541304f4e098b4c7617b718287ab40646d5deb92) +++ src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -53,7 +53,7 @@ CFormat& SetParam(PCTSTR pszName, int iData); CFormat& SetParam(PCTSTR pszName, bool bData); - operator const wchar_t*() const + const wchar_t* ToString() const { return m_strText.c_str(); } Index: src/liblogger/liblogger.h =================================================================== diff -u -r7de00e54431d78b6c54fad6fb163dbc306381ef5 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/liblogger/liblogger.h (.../liblogger.h) (revision 7de00e54431d78b6c54fad6fb163dbc306381ef5) +++ src/liblogger/liblogger.h (.../liblogger.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -1,3 +1,24 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __LIBLOGGER_H__ +#define __LIBLOGGER_H__ + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LIBLOGGER_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project @@ -19,3 +40,5 @@ */ #define LIBLOGGER_API #endif + +#endif Index: src/libserializer/TModificationTracker.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libserializer/TModificationTracker.h (.../TModificationTracker.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libserializer/TModificationTracker.h (.../TModificationTracker.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -64,7 +64,7 @@ return *this; } - operator const T&() const + explicit operator const T&() const { return m_tValue; } Index: src/libserializer/TSQLiteSerializerRowData.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libserializer/TSQLiteSerializerRowData.cpp (.../TSQLiteSerializerRowData.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libserializer/TSQLiteSerializerRowData.cpp (.../TSQLiteSerializerRowData.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -519,6 +519,19 @@ break; } + case IColumnsDefinition::eType_bool: + case IColumnsDefinition::eType_short: + case IColumnsDefinition::eType_ushort: + case IColumnsDefinition::eType_int: + case IColumnsDefinition::eType_uint: + case IColumnsDefinition::eType_long: + case IColumnsDefinition::eType_ulong: + case IColumnsDefinition::eType_longlong: + case IColumnsDefinition::eType_ulonglong: + case IColumnsDefinition::eType_double: + case IColumnsDefinition::eType_Last: + default: + break; } } Index: src/libserializer/TSharedModificationTracker.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libserializer/TSharedModificationTracker.h (.../TSharedModificationTracker.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libserializer/TSharedModificationTracker.h (.../TSharedModificationTracker.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -45,7 +45,7 @@ } template - TSharedModificationTracker(Bitset& rBitset, const V&... rValues) : + explicit TSharedModificationTracker(Bitset& rBitset, const V&... rValues) : m_tValue(rValues...), m_rBitset(rBitset) { Index: src/libserializer/Tests/TestsTModificationTracker.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libserializer/Tests/TestsTModificationTracker.cpp (.../TestsTModificationTracker.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libserializer/Tests/TestsTModificationTracker.cpp (.../TestsTModificationTracker.cpp) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -12,15 +12,15 @@ TModificationTracker tracker; EXPECT_TRUE(tracker.IsModified()); - EXPECT_EQ(TString(), tracker); + EXPECT_EQ(TString(), (TString)tracker); EXPECT_FALSE(tracker.IsAdded()); } TEST(TModificationTrackerTests, ValueConstructor_NotAdded) { TModificationTracker tracker(L"SomeString", false); - EXPECT_EQ(TString(L"SomeString"), tracker); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker); EXPECT_TRUE(tracker.IsModified()); EXPECT_FALSE(tracker.IsAdded()); } @@ -29,7 +29,7 @@ { TModificationTracker tracker(L"SomeString", true); - EXPECT_EQ(TString(L"SomeString"), tracker); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker); EXPECT_TRUE(tracker.IsModified()); EXPECT_TRUE(tracker.IsAdded()); } @@ -39,7 +39,7 @@ TModificationTracker tracker(L"SomeString", false); TModificationTracker tracker2(tracker); - EXPECT_EQ(TString(L"SomeString"), tracker2); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker2); EXPECT_TRUE(tracker2.IsModified()); EXPECT_FALSE(tracker2.IsAdded()); } @@ -49,7 +49,7 @@ TModificationTracker tracker(L"SomeString", true); TModificationTracker tracker2(tracker); - EXPECT_EQ(TString(L"SomeString"), tracker2); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker2); EXPECT_TRUE(tracker2.IsModified()); EXPECT_TRUE(tracker2.IsAdded()); } @@ -62,7 +62,7 @@ tracker2 = tracker; - EXPECT_EQ(TString(L"SomeString"), tracker2); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker2); EXPECT_TRUE(tracker2.IsModified()); EXPECT_FALSE(tracker2.IsAdded()); } @@ -74,7 +74,7 @@ tracker2 = tracker; - EXPECT_EQ(TString(L"SomeString"), tracker2); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker2); EXPECT_TRUE(tracker2.IsModified()); EXPECT_TRUE(tracker2.IsAdded()); } @@ -86,7 +86,7 @@ tracker = L"OtherString"; - EXPECT_EQ(TString(L"OtherString"), tracker); + EXPECT_EQ(TString(L"OtherString"), (TString)tracker); EXPECT_TRUE(tracker.IsModified()); EXPECT_FALSE(tracker.IsAdded()); } @@ -98,7 +98,7 @@ tracker = L"SomeString"; - EXPECT_EQ(TString(L"SomeString"), tracker); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker); EXPECT_FALSE(tracker.IsModified()); EXPECT_FALSE(tracker.IsAdded()); } @@ -111,7 +111,7 @@ tracker.Modify() = L"SomeString"; - EXPECT_EQ(TString(L"SomeString"), tracker); + EXPECT_EQ(TString(L"SomeString"), (TString)tracker); EXPECT_TRUE(tracker.IsModified()); EXPECT_FALSE(tracker.IsAdded()); } Index: src/libserializer/libserializer.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libserializer/libserializer.h (.../libserializer.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libserializer/libserializer.h (.../libserializer.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -1,3 +1,24 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __LIBSERIALIZER_H__ +#define __LIBSERIALIZER_H__ + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LIBSERIALIZER_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project @@ -19,3 +40,5 @@ */ #define LIBSERIALIZER_API #endif + +#endif Index: src/libstring/TStringException.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libstring/TStringException.h (.../TStringException.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libstring/TStringException.h (.../TStringException.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -26,7 +26,7 @@ class LIBSTRING_API TStringException : public std::exception { public: - TStringException(const char* pszMsg); + explicit TStringException(const char* pszMsg); }; } Index: src/libstring/libstring.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r3921d82d9605d98b2281f3f42d9f9c8385b89a3e --- src/libstring/libstring.h (.../libstring.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libstring/libstring.h (.../libstring.h) (revision 3921d82d9605d98b2281f3f42d9f9c8385b89a3e) @@ -1,3 +1,24 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __LIBSTRING_H__ +#define __LIBSTRING_H__ + // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LIBSTRING_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project @@ -19,3 +40,5 @@ */ #define LIBSTRING_API #endif + +#endif