Index: src/ch/FileInfo.h =================================================================== diff -u -rca1933ef07e18d939449e4878eca5cc81cc73f3f -r73b2826b21fdda4cbae36e8a1a7b7d5454ee519c --- src/ch/FileInfo.h (.../FileInfo.h) (revision ca1933ef07e18d939449e4878eca5cc81cc73f3f) +++ src/ch/FileInfo.h (.../FileInfo.h) (revision 73b2826b21fdda4cbae36e8a1a7b7d5454ee519c) @@ -23,8 +23,6 @@ #define __FILEINFO_H__ #include "DestPath.h" -#include -#include void FindFreeSubstituteName(CString strSrcPath, CString strDstPath, CString* pstrResult); extern void GetDriveData(LPCTSTR lpszPath, int *piDrvNum, UINT *puiDrvType); @@ -334,9 +332,9 @@ { if(bOnlyFlags) { - CFileInfoPtr& spFileInfo = m_vFiles.at(stIndex); + CFileInfoPtr& rspFileInfo = m_vFiles.at(stIndex); ar >> uiFlags; - spFileInfo->SetFlags(uiFlags); + rspFileInfo->SetFlags(uiFlags); } else { Index: src/ch/Stdafx.h =================================================================== diff -u -r31fe86ab42b32376e21caf14d7f56bc9bc4e9e5e -r73b2826b21fdda4cbae36e8a1a7b7d5454ee519c --- src/ch/Stdafx.h (.../Stdafx.h) (revision 31fe86ab42b32376e21caf14d7f56bc9bc4e9e5e) +++ src/ch/Stdafx.h (.../Stdafx.h) (revision 73b2826b21fdda4cbae36e8a1a7b7d5454ee519c) @@ -40,12 +40,12 @@ #include #include #include +#include +#include -#pragma warning (disable: 4711) #include "debug.h" #include "../libicpf/file.h" #include "../libictranslate/LanguageDialog.h" -#include #include "../common/ErrorConstants.h" #include "../libchcore/TLogger.h" #include "SerializationHelpers.h" Index: src/ch/ch.vc90.vcproj =================================================================== diff -u -r044d0e17cdedf3055202486a2235e1a3c8dd6e56 -r73b2826b21fdda4cbae36e8a1a7b7d5454ee519c --- src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 044d0e17cdedf3055202486a2235e1a3c8dd6e56) +++ src/ch/ch.vc90.vcproj (.../ch.vc90.vcproj) (revision 73b2826b21fdda4cbae36e8a1a7b7d5454ee519c) @@ -51,7 +51,6 @@ /> #include #include -#include #include // assume max sectors of 4kB (for rounding) @@ -166,12 +165,13 @@ void TTaskLocalStats::DisconnectGlobalStats() { boost::unique_lock lock(m_lock); + if(m_prtGlobalStats) { m_prtGlobalStats->DecreaseGlobalProgressData(m_ullProcessedSize, m_ullTotalSize); - m_prtGlobalStats = NULL; if(m_bTaskIsRunning) m_prtGlobalStats->DecreaseRunningTasks(); + m_prtGlobalStats = NULL; } } @@ -2807,17 +2807,17 @@ catch(std::exception& e) { CString strFmt; - strFmt.Format(_T("Cannot load task data: %s (reason: %S)"), strPath, e.what()); + strFmt.Format(_T("Cannot load task data: %s (reason: %S)"), (PCTSTR)strPath, e.what()); LOG_ERROR(strFmt); } catch(icpf::exception& e) { - tchar_t szBuffer[65536]; - e.get_info(szBuffer, 65536); - szBuffer[65535] = _T('\0'); + CString strMsg; + e.get_info(strMsg.GetBufferSetLength(65536), 65536); + strMsg.ReleaseBuffer(); CString strFmt; - strFmt.Format(_T("Cannot load task data: %s (reason: %s)"), strPath, szBuffer); + strFmt.Format(_T("Cannot load task data: %s (reason: %s)"), (PCTSTR)strPath, (PCTSTR)strMsg); LOG_ERROR(strFmt); } }