Revision: 5022
http://winmerge.svn.sourceforge.net/winmerge/?rev=5022&view=rev
Author: kimmov
Date: 2008-02-10 05:34:26 -0800 (Sun, 10 Feb 2008)
Log Message:
-----------
Remove some usage of CString in DiffThread.
Modified Paths:
--------------
trunk/Src/DiffThread.cpp
trunk/Src/DiffThread.h
Modified: trunk/Src/DiffThread.cpp
===================================================================
--- trunk/Src/DiffThread.cpp 2008-02-10 13:23:21 UTC (rev 5021)
+++ trunk/Src/DiffThread.cpp 2008-02-10 13:34:26 UTC (rev 5022)
@@ -23,6 +23,7 @@
// $Id$
#include "stdafx.h"
+#include "UnicodeString.h"
#include "diffcontext.h"
#include "diffthread.h"
#include "DirScan.h"
@@ -51,8 +52,8 @@
*/
struct DiffFuncStruct
{
- CString path1; /**< First path to compare. */
- CString path2; /**< Second path to compare. */
+ String path1; /**< First path to compare. */
+ String path2; /**< Second path to compare. */
CDiffContext * context; /**< Compare context. */
UINT msgUIUpdate; /**< Windows message for updating GUI. */
HWND hWindow; /**< Window getting status updates. */
@@ -146,8 +147,8 @@
* @param [in] bRecursive Is the compare recursive (subfolders included)?
* @return Success (1) or error for thread. Currently always 1.
*/
-UINT CDiffThread::CompareDirectories(const CString & dir1,
- const CString & dir2, BOOL bRecursive)
+UINT CDiffThread::CompareDirectories(LPCTSTR dir1, LPCTSTR dir2,
+ BOOL bRecursive)
{
ASSERT(m_pDiffParm->nThreadState != THREAD_COMPARING);
@@ -255,7 +256,6 @@
else
{
myStruct->context->m_pCompareStats->SetCompareState(CompareStats::STATE_START);
- CString subdir; // blank to start at roots specified in diff context
#ifdef _DEBUG
_CrtMemState memStateBefore;
_CrtMemState memStateAfter;
@@ -267,7 +267,9 @@
SetEvent(myStruct->hEvent);
// Build results list (except delaying file comparisons until below)
- DirScan_GetItems(paths, subdir, subdir, myStruct->pItemList, casesensitive, depth, myStruct->context);
+ // Empty subdirs to start compare from root folders in diff context
+ DirScan_GetItems(paths, _T(""), _T(""), myStruct->pItemList,
+ casesensitive, depth, myStruct->context);
#ifdef _DEBUG
_CrtMemCheckpoint(&memStateAfter);
Modified: trunk/Src/DiffThread.h
===================================================================
--- trunk/Src/DiffThread.h 2008-02-10 13:23:21 UTC (rev 5021)
+++ trunk/Src/DiffThread.h 2008-02-10 13:34:26 UTC (rev 5022)
@@ -52,7 +52,7 @@
CDiffThread();
~CDiffThread();
void SetContext(CDiffContext * pCtx);
- UINT CompareDirectories(const CString & dir1, const CString & dir2, BOOL bRecursive);
+ UINT CompareDirectories(LPCTSTR dir1, LPCTSTR dir2, BOOL bRecursive);
void SetHwnd(HWND hWnd);
void SetMessageIDs(UINT updateMsg);
void SetCompareSelected(bool bSelected = false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|