OSDN Git Service

Reduce Level 4 Build Warnings (2)
authorGreyMerlin <GreyMerlin@gmail.com>
Thu, 26 Jul 2018 20:40:22 +0000 (13:40 -0700)
committerGreyMerlin <GreyMerlin@gmail.com>
Thu, 26 Jul 2018 20:40:22 +0000 (13:40 -0700)
* Warning C4459: declaration of 'c' hides global declaration
* Warning C4458: declaration of 'd' hides class member
* Warning C4457 : declaration of 'e' hides function parameter
* Warning C4456: declaration of 'f' hides previous local declaration

I consider that using identifier scope to "hide" more "global"
identifier names is a very misleading and dangerous programming
practice.

14 files changed:
Externals/crystaledit/editlib/registry.cpp
Src/Common/MyCom.h
Src/DiffWrapper.cpp
Src/DirActions.h
Src/DirScan.cpp
Src/FolderCmp.cpp
Src/MainFrm.cpp
Src/Merge.cpp
Src/MergeDoc.h
Src/MergeEditSplitterView.cpp
Src/MergeEditView.cpp
Src/PatchDlg.cpp
Src/PatchTool.cpp
Src/Test.cpp

index 68b5335..0e8a045 100644 (file)
@@ -1072,27 +1072,27 @@ bool CRegVal::GetNumber (DWORD *pdwNumber) const
 }
 
 /* get binary data */
-bool CRegVal::GetBinary (LPBYTE pbyteData, DWORD dwSize) const
+bool CRegVal::GetBinary (LPBYTE _pbyteData, DWORD _dwSize) const
 {
-  return RegValGetBinary (this, pbyteData, dwSize);
+  return RegValGetBinary (this, _pbyteData, _dwSize);
 }
 
 /* get new binary data */
-bool CRegVal::GetNewBinary (LPBYTE *pbyteData, DWORD *pdwSize) const
+bool CRegVal::GetNewBinary (LPBYTE *_pbyteData, DWORD *_pdwSize) const
 {
-  return RegValGetNewBinary (this, pbyteData, pdwSize);
+  return RegValGetNewBinary (this, _pbyteData, _pdwSize);
 }
 
 /* get a string */
-bool CRegVal::GetString (LPTSTR pszString, DWORD dwLength) const
+bool CRegVal::GetString (LPTSTR _pszString, DWORD _dwLength) const
 {
-  return RegValGetString (this, pszString, dwLength);
+  return RegValGetString (this, _pszString, _dwLength);
 }
 
 /* get a new string */
-bool CRegVal::GetNewString (LPTSTR *pszString, DWORD *pdwLength) const
+bool CRegVal::GetNewString (LPTSTR *_pszString, DWORD *_pdwLength) const
 {
-  return RegValGetNewString (this, pszString, pdwLength);
+  return RegValGetNewString (this, _pszString, _pdwLength);
 }
 
 /* get an array of strings */
@@ -1124,21 +1124,21 @@ bool CRegVal::GetStringArr (CStringArray &arrString) const
 #endif /* REG_WITH_MFC */
 
 /* set a number */
-void CRegVal::SetNumber (DWORD dwNumber)
+void CRegVal::SetNumber (DWORD _dwNumber)
 {
-  RegValSetNumber (this, dwNumber);
+  RegValSetNumber (this, _dwNumber);
 }
 
 /* set binary data */
-bool CRegVal::SetBinary (const LPBYTE pbyteData, DWORD dwSize)
+bool CRegVal::SetBinary (const LPBYTE _pbyteData, DWORD _dwSize)
 {
-  return RegValSetBinary (this, pbyteData, dwSize);
+  return RegValSetBinary (this, _pbyteData, _dwSize);
 }
 
 /* set a string */
-bool CRegVal::SetString (LPCTSTR pszString)
+bool CRegVal::SetString (LPCTSTR _pszString)
 {
-  return RegValSetString (this, pszString);
+  return RegValSetString (this, _pszString);
 }
 
 /* set an array of strings */
index 56a096d..c7a3792 100644 (file)
@@ -260,7 +260,7 @@ public:
        {\r
                VariantClear(this);\r
        }\r
-       HRESULT ChangeType(VARTYPE vt)\r
+       HRESULT ChangeType(VARTYPE _vt)\r
        {\r
                return VariantChangeType(this, this, 0, vt);\r
        }\r
@@ -319,10 +319,10 @@ public:
 class CMyDispParamsUnnamed : public DISPPARAMS\r
 {\r
 public:\r
-       void Make(VARIANT *rgvarg)\r
+       void Make(VARIANT *_rgvarg)\r
        {\r
                ZeroMemory(this, sizeof *this);\r
-               DISPPARAMS::rgvarg = rgvarg;\r
+               DISPPARAMS::rgvarg = _rgvarg;\r
        }\r
        void Drop()\r
        {\r
index 27141ee..4b46d20 100644 (file)
@@ -646,10 +646,10 @@ void CDiffWrapper::PostFilter(int LineNumberLeft, int QtyLinesLeft, int LineNumb
  * @param [in] files Files to compare
  * @param [in] tempPaths Are given paths temporary (can be deleted)?.
  */
-void CDiffWrapper::SetPaths(const PathContext &files,
+void CDiffWrapper::SetPaths(const PathContext &tFiles,
                bool tempPaths)
 {
-       m_files = files;
+       m_files = tFiles;
        m_bPathsAreTemp = tempPaths;
 }
 
@@ -681,10 +681,10 @@ void CDiffWrapper::SetAlternativePaths(const PathContext &altPaths)
  */
 bool CDiffWrapper::RunFileDiff()
 {
-       PathContext files = m_files;
+       PathContext aFiles = m_files;
        int file;
        for (file = 0; file < m_files.GetSize(); file++)
-               files[file] = paths::ToWindowsPath(files[file]);
+               aFiles[file] = paths::ToWindowsPath(aFiles[file]);
 
        bool bRet = true;
        String strFileTemp[3];
@@ -695,7 +695,7 @@ bool CDiffWrapper::RunFileDiff()
        if (m_bUseDiffList)
                m_nDiffs = m_pDiffList->GetSize();
 
-       for (file = 0; file < files.GetSize(); file++)
+       for (file = 0; file < aFiles.GetSize(); file++)
        {
                if (m_bPluginsEnabled)
                {
@@ -731,9 +731,9 @@ bool CDiffWrapper::RunFileDiff()
        DiffFileData diffdata, diffdata10, diffdata12;
        int bin_flag = 0, bin_flag10 = 0, bin_flag12 = 0;
 
-       if (files.GetSize() == 2)
+       if (aFiles.GetSize() == 2)
        {
-               diffdata.SetDisplayFilepaths(files[0], files[1]); // store true names for diff utils patch file
+               diffdata.SetDisplayFilepaths(aFiles[0], aFiles[1]); // store true names for diff utils patch file
                // This opens & fstats both files (if it succeeds)
                if (!diffdata.OpenFiles(strFileTemp[0], strFileTemp[1]))
                {
@@ -765,8 +765,8 @@ bool CDiffWrapper::RunFileDiff()
        }
        else
        {
-               diffdata10.SetDisplayFilepaths(files[1], files[0]); // store true names for diff utils patch file
-               diffdata12.SetDisplayFilepaths(files[1], files[2]); // store true names for diff utils patch file
+               diffdata10.SetDisplayFilepaths(aFiles[1], aFiles[0]); // store true names for diff utils patch file
+               diffdata12.SetDisplayFilepaths(aFiles[1], aFiles[2]); // store true names for diff utils patch file
 
                if (!diffdata10.OpenFiles(strFileTemp[1], strFileTemp[0]))
                {
@@ -794,7 +794,7 @@ bool CDiffWrapper::RunFileDiff()
        file_data * inf10 = diffdata10.m_inf;
        file_data * inf12 = diffdata12.m_inf;
 
-       if (files.GetSize() == 2)
+       if (aFiles.GetSize() == 2)
        {
                if (bin_flag != 0)
                {
@@ -846,7 +846,7 @@ bool CDiffWrapper::RunFileDiff()
 
 
        // Create patch file
-       if (!m_status.bBinaries && m_bCreatePatchFile && files.GetSize() == 2)
+       if (!m_status.bBinaries && m_bCreatePatchFile && aFiles.GetSize() == 2)
        {
                WritePatchFile(script, &inf[0]);
        }
@@ -855,7 +855,7 @@ bool CDiffWrapper::RunFileDiff()
        // This is done on every WinMerge's doc rescan!
        if (!m_status.bBinaries && m_bUseDiffList)
        {
-               if (files.GetSize() == 2)
+               if (aFiles.GetSize() == 2)
                        LoadWinMergeDiffsFromDiffUtilsScript(script, diffdata.m_inf);
                else
                        LoadWinMergeDiffsFromDiffUtilsScript3(
@@ -864,7 +864,7 @@ bool CDiffWrapper::RunFileDiff()
        }                       
 
        // cleanup the script
-       if (files.GetSize() == 2)
+       if (aFiles.GetSize() == 2)
                FreeDiffUtilsScript(script);
        else
        {
@@ -873,7 +873,7 @@ bool CDiffWrapper::RunFileDiff()
        }
 
        // Done with diffutils filedata
-       if (files.GetSize() == 2)
+       if (aFiles.GetSize() == 2)
        {
                diffdata.Close();
        }
@@ -886,9 +886,9 @@ bool CDiffWrapper::RunFileDiff()
        if (m_bPluginsEnabled)
        {
                // Delete temp files transformation functions possibly created
-               for (file = 0; file < files.GetSize(); file++)
+               for (file = 0; file < aFiles.GetSize(); file++)
                {
-                       if (strutils::compare_nocase(files[file], strFileTemp[file]) != 0)
+                       if (strutils::compare_nocase(aFiles[file], strFileTemp[file]) != 0)
                        {
                                try
                                {
@@ -1412,7 +1412,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3(
                Comp02Functor(inf10, inf12), (m_pFilterList && m_pFilterList->HasRegExps()));
 }
 
-void CDiffWrapper::WritePatchFileHeader(enum output_style output_style, bool bAppendFiles)
+void CDiffWrapper::WritePatchFileHeader(enum output_style tOutput_style, bool bAppendFiles)
 {
        outfile = nullptr;
        if (!m_sPatchFile.empty())
@@ -1429,7 +1429,7 @@ void CDiffWrapper::WritePatchFileHeader(enum output_style output_style, bool bAp
        }
 
        // Output patchfile
-       switch (output_style)
+       switch (tOutput_style)
        {
        case OUTPUT_NORMAL:
        case OUTPUT_CONTEXT:
@@ -1451,7 +1451,7 @@ void CDiffWrapper::WritePatchFileHeader(enum output_style output_style, bool bAp
        outfile = nullptr;
 }
 
-void CDiffWrapper::WritePatchFileTerminator(enum output_style output_style)
+void CDiffWrapper::WritePatchFileTerminator(enum output_style tOutput_style)
 {
        outfile = nullptr;
        if (!m_sPatchFile.empty())
@@ -1467,7 +1467,7 @@ void CDiffWrapper::WritePatchFileTerminator(enum output_style output_style)
        }
 
        // Output patchfile
-       switch (output_style)
+       switch (tOutput_style)
        {
        case OUTPUT_NORMAL:
        case OUTPUT_CONTEXT:
index 1ebcfc7..501792c 100644 (file)
@@ -700,8 +700,8 @@ std::pair<int, int> CountPredifferYesNo(const InputIterator& begin, const InputI
                if (!di.diffcode.isDirectory() && !di.diffcode.isBin() && IsItemExistAll(ctxt, di)
                        && !di.diffcode.isResultFiltered())
                {
-                       PathContext files = GetItemFileNames(ctxt, di);
-                       String filteredFilenames = strutils::join(files.begin(), files.end(), _T("|"));
+                       PathContext tFiles = GetItemFileNames(ctxt, di);
+                       String filteredFilenames = strutils::join(tFiles.begin(), tFiles.end(), _T("|"));
                        PackingInfo * unpacker;
                        PrediffingInfo * prediffer;
                        const_cast<CDiffContext&>(ctxt).FetchPluginInfos(filteredFilenames, &unpacker, &prediffer);
index 3084b44..ba56743 100644 (file)
@@ -156,9 +156,9 @@ int DirScan_GetItems(const PathContext &paths, const String subdir[],
                }
        }
 
-       DirItemArray dirs[3], files[3];
+       DirItemArray dirs[3], aFiles[3];
        for (nIndex = 0; nIndex < nDirs; nIndex++)
-               LoadAndSortFiles(sDir[nIndex], &dirs[nIndex], &files[nIndex], casesensitive);
+               LoadAndSortFiles(sDir[nIndex], &dirs[nIndex], &aFiles[nIndex], casesensitive);
 
        // Allow user to abort scanning
        if (pCtxt->ShouldAbort())
@@ -169,7 +169,7 @@ int DirScan_GetItems(const PathContext &paths, const String subdir[],
        // j points to current directory in right list (rightDirs)
 
        for (nIndex = 0; nIndex < nDirs; nIndex++)
-               if (dirs[nIndex].size() != 0 || files[nIndex].size() != 0) break;
+               if (dirs[nIndex].size() != 0 || aFiles[nIndex].size() != 0) break;
        if (nIndex == nDirs)
                return 0;
 
@@ -331,8 +331,8 @@ int DirScan_GetItems(const PathContext &paths, const String subdir[],
                        k++;
        }
        // Handle files
-       // i points to current file in left list (files[0])
-       // j points to current file in right list (files[1])
+       // i points to current file in left list (aFiles[0])
+       // j points to current file in right list (aFiles[1])
        i=0, j=0, k=0;
        while (1)
        {
@@ -340,98 +340,98 @@ int DirScan_GetItems(const PathContext &paths, const String subdir[],
                        return -1;
 
 
-               // Comparing file files[0][i].name to files[1][j].name
-               if (i<files[0].size() && (j==files[1].size() ||
-                               collstr(files[0][i].filename, files[1][j].filename, casesensitive) < 0)
+               // Comparing file aFiles[0][i].name to aFiles[1][j].name
+               if (i<aFiles[0].size() && (j==aFiles[1].size() ||
+                               collstr(aFiles[0][i].filename, aFiles[1][j].filename, casesensitive) < 0)
                        && (nDirs < 3 || 
-                               (k==files[2].size() || collstr(files[0][i].filename, files[2][k].filename, casesensitive)<0) ))
+                               (k==aFiles[2].size() || collstr(aFiles[0][i].filename, aFiles[2][k].filename, casesensitive)<0) ))
                {
                        if (nDirs < 3)
                        {
                                const unsigned nDiffCode = DIFFCODE::FIRST | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], &files[0][i], 0, nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], &aFiles[0][i], 0, nDiffCode, myStruct, parent);
                        }
                        else
                        {
                                const unsigned nDiffCode = DIFFCODE::FIRST | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], &files[0][i], 0, 0, nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], &aFiles[0][i], 0, 0, nDiffCode, myStruct, parent);
                        }
                        // Advance left pointer over left-only entry, and then retest with new pointers
                        ++i;
                        continue;
                }
-               if (j<files[1].size() && (i==files[0].size() ||
-                               collstr(files[0][i].filename, files[1][j].filename, casesensitive) > 0)
+               if (j<aFiles[1].size() && (i==aFiles[0].size() ||
+                               collstr(aFiles[0][i].filename, aFiles[1][j].filename, casesensitive) > 0)
                        && (nDirs < 3 ||
-                               (k==files[2].size() || collstr(files[1][j].filename, files[2][k].filename, casesensitive)<0) ))
+                               (k==aFiles[2].size() || collstr(aFiles[1][j].filename, aFiles[2][k].filename, casesensitive)<0) ))
                {
                        const unsigned nDiffCode = DIFFCODE::SECOND | DIFFCODE::FILE;
                        if (nDirs < 3)
-                               AddToList(subdir[0], subdir[1], 0, &files[1][j], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], 0, &aFiles[1][j], nDiffCode, myStruct, parent);
                        else
-                               AddToList(subdir[0], subdir[1], subdir[2], 0, &files[1][j], 0, nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], 0, &aFiles[1][j], 0, nDiffCode, myStruct, parent);
                        // Advance right pointer over right-only entry, and then retest with new pointers
                        ++j;
                        continue;
                }
                if (nDirs == 3)
                {
-                       if (k<files[2].size() && (i==files[0].size() ||
-                                       collstr(files[2][k].filename, files[0][i].filename, casesensitive)<0)
-                               && (j==files[1].size() || collstr(files[2][k].filename, files[1][j].filename, casesensitive)<0) )
+                       if (k<aFiles[2].size() && (i==aFiles[0].size() ||
+                                       collstr(aFiles[2][k].filename, aFiles[0][i].filename, casesensitive)<0)
+                               && (j==aFiles[1].size() || collstr(aFiles[2][k].filename, aFiles[1][j].filename, casesensitive)<0) )
                        {
                                const unsigned nDiffCode = DIFFCODE::THIRD | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], 0, 0, &files[2][k], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], 0, 0, &aFiles[2][k], nDiffCode, myStruct, parent);
                                ++k;
                                // Advance right pointer over right-only entry, and then retest with new pointers
                                continue;
                        }
 
-                       if ((i<files[0].size() && j<files[1].size() && collstr(files[0][i].filename, files[1][j].filename, casesensitive) == 0)
-                           && (k==files[2].size() || collstr(files[0][i].filename, files[2][k].filename, casesensitive) != 0))
+                       if ((i<aFiles[0].size() && j<aFiles[1].size() && collstr(aFiles[0][i].filename, aFiles[1][j].filename, casesensitive) == 0)
+                           && (k==aFiles[2].size() || collstr(aFiles[0][i].filename, aFiles[2][k].filename, casesensitive) != 0))
                        {
                                const unsigned nDiffCode = DIFFCODE::FIRST | DIFFCODE::SECOND | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], &files[0][i], &files[1][j], 0, nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], &aFiles[0][i], &aFiles[1][j], 0, nDiffCode, myStruct, parent);
                                ++i;
                                ++j;
                                continue;
                        }
-                       else if ((i<files[0].size() && k<files[2].size() && collstr(files[0][i].filename, files[2][k].filename, casesensitive) == 0)
-                           && (j==files[1].size() || collstr(files[1][j].filename, files[2][k].filename, casesensitive) != 0))
+                       else if ((i<aFiles[0].size() && k<aFiles[2].size() && collstr(aFiles[0][i].filename, aFiles[2][k].filename, casesensitive) == 0)
+                           && (j==aFiles[1].size() || collstr(aFiles[1][j].filename, aFiles[2][k].filename, casesensitive) != 0))
                        {
                                const unsigned nDiffCode = DIFFCODE::FIRST | DIFFCODE::THIRD | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], &files[0][i], 0, &files[2][k], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], &aFiles[0][i], 0, &aFiles[2][k], nDiffCode, myStruct, parent);
                                ++i;
                                ++k;
                                continue;
                        }
-                       else if ((j<files[1].size() && k<files[2].size() && collstr(files[1][j].filename, files[2][k].filename, casesensitive) == 0)
-                           && (i==files[0].size() || collstr(files[0][i].filename, files[1][j].filename, casesensitive) != 0))
+                       else if ((j<aFiles[1].size() && k<aFiles[2].size() && collstr(aFiles[1][j].filename, aFiles[2][k].filename, casesensitive) == 0)
+                           && (i==aFiles[0].size() || collstr(aFiles[0][i].filename, aFiles[1][j].filename, casesensitive) != 0))
                        {
                                const unsigned nDiffCode = DIFFCODE::SECOND | DIFFCODE::THIRD | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], 0, &files[1][j], &files[2][k], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], 0, &aFiles[1][j], &aFiles[2][k], nDiffCode, myStruct, parent);
                                ++j;
                                ++k;
                                continue;
                        }
                }
-               if (i<files[0].size())
+               if (i<aFiles[0].size())
                {
                        if (nDirs < 3)
                        {
-                               assert(j<files[1].size());
+                               assert(j<aFiles[1].size());
                                const unsigned nDiffCode = DIFFCODE::BOTH | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], &files[0][i], &files[1][j], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], &aFiles[0][i], &aFiles[1][j], nDiffCode, myStruct, parent);
                                ++i;
                                ++j;
                                continue;
                        }
                        else
                        {
-                               assert(j<files[1].size());
-                               assert(k<files[2].size());
+                               assert(j<aFiles[1].size());
+                               assert(k<aFiles[2].size());
                                const unsigned nDiffCode = DIFFCODE::ALL | DIFFCODE::FILE;
-                               AddToList(subdir[0], subdir[1], subdir[2], &files[0][i], &files[1][j], &files[2][k], nDiffCode, myStruct, parent);
+                               AddToList(subdir[0], subdir[1], subdir[2], &aFiles[0][i], &aFiles[1][j], &aFiles[2][k], nDiffCode, myStruct, parent);
                                ++i;
                                ++j;
                                ++k;
index 7668538..1508fca 100644 (file)
@@ -74,8 +74,8 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
                for (nIndex = 0; nIndex < nDirs; nIndex++)
                        m_diffFileData.m_textStats[nIndex].clear();
 
-               PathContext files;
-               GetComparePaths(pCtxt, di, files);
+               PathContext tFiles;
+               GetComparePaths(pCtxt, di, tFiles);
                struct change *script = NULL;
                struct change *script10 = NULL;
                struct change *script12 = NULL;
@@ -91,7 +91,7 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
 
                // Transformation happens here
                // text used for automatic mode : plugin filter must match it
-               String filteredFilenames = strutils::join(files.begin(), files.end(), _T("|"));
+               String filteredFilenames = strutils::join(tFiles.begin(), tFiles.end(), _T("|"));
 
                PackingInfo * infoUnpacker=0;
                PrediffingInfo * infoPrediffer=0;
@@ -107,7 +107,7 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
                for (nIndex = 0; nIndex < nDirs; nIndex++)
                {
                // plugin may alter filepaths to temp copies (which we delete before returning in all cases)
-                       filepathUnpacked[nIndex] = files[nIndex];
+                       filepathUnpacked[nIndex] = tFiles[nIndex];
 
                        //DiffFileData diffdata; //(filepathTransformed1, filepathTransformed2);
                        // Invoke unpacking plugins
@@ -146,18 +146,18 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
                // Actually compare the files
                // `diffutils_compare_files()` is a fairly thin front-end to GNU diffutils
 
-               if (files.GetSize() == 2)
+               if (tFiles.GetSize() == 2)
                {
-                       m_diffFileData.SetDisplayFilepaths(files[0], files[1]); // store true names for diff utils patch file
+                       m_diffFileData.SetDisplayFilepaths(tFiles[0], tFiles[1]); // store true names for diff utils patch file
                        // This opens & fstats both files (if it succeeds)
                        if (!m_diffFileData.OpenFiles(filepathTransformed[0], filepathTransformed[1]))
                                goto exitPrepAndCompare;
                }
                else
                {
-                       diffdata10.m_diffFileData.SetDisplayFilepaths(files[1], files[0]); // store true names for diff utils patch file
-                       diffdata12.m_diffFileData.SetDisplayFilepaths(files[1], files[2]); // store true names for diff utils patch file
-                       diffdata02.m_diffFileData.SetDisplayFilepaths(files[0], files[2]); // store true names for diff utils patch file
+                       diffdata10.m_diffFileData.SetDisplayFilepaths(tFiles[1], tFiles[0]); // store true names for diff utils patch file
+                       diffdata12.m_diffFileData.SetDisplayFilepaths(tFiles[1], tFiles[2]); // store true names for diff utils patch file
+                       diffdata02.m_diffFileData.SetDisplayFilepaths(tFiles[0], tFiles[2]); // store true names for diff utils patch file
 
                        if (!diffdata10.m_diffFileData.OpenFiles(filepathTransformed[1], filepathTransformed[0]))
                                goto exitPrepAndCompare;
@@ -181,7 +181,7 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
 
                if (nCompMethod == CMP_CONTENT)
                {
-                       if (files.GetSize() == 2)
+                       if (tFiles.GetSize() == 2)
                        {
                                if (m_pDiffUtilsEngine == NULL)
                                        m_pDiffUtilsEngine.reset(new CompareEngines::DiffUtils());
@@ -310,7 +310,7 @@ int FolderCmp::prepAndCompareFiles(CDiffContext * pCtxt, DIFFITEM &di)
                else if (nCompMethod == CMP_QUICK_CONTENT)
                {
                        // use our own byte-by-byte compare
-                       if (files.GetSize() == 2)
+                       if (tFiles.GetSize() == 2)
                        {
                                if (m_pByteCompare == NULL)
                                        m_pByteCompare.reset(new ByteCompare());
@@ -427,11 +427,11 @@ exitPrepAndCompare:
                        try { TFile(filepathTransformed[1]).remove(); } catch (...) { LogErrorString(strutils::format(_T("DeleteFile(%s) failed"), filepathTransformed[1].c_str())); }
                if (nDirs > 2 && filepathTransformed[2] != filepathUnpacked[2])
                        try { TFile(filepathTransformed[2]).remove(); } catch (...) { LogErrorString(strutils::format(_T("DeleteFile(%s) failed"), filepathTransformed[2].c_str())); }
-               if (filepathUnpacked[0] != files[0])
+               if (filepathUnpacked[0] != tFiles[0])
                        try { TFile(filepathUnpacked[0]).remove(); } catch (...) { LogErrorString(strutils::format(_T("DeleteFile(%s) failed"), filepathUnpacked[0].c_str())); }
-               if (filepathUnpacked[1] != files[1])
+               if (filepathUnpacked[1] != tFiles[1])
                        try { TFile(filepathUnpacked[1]).remove(); } catch (...) { LogErrorString(strutils::format(_T("DeleteFile(%s) failed"), filepathUnpacked[1].c_str())); }
-               if (nDirs > 2 && filepathUnpacked[2] != files[2])
+               if (nDirs > 2 && filepathUnpacked[2] != tFiles[2])
                        try { TFile(filepathUnpacked[2]).remove(); } catch (...) { LogErrorString(strutils::format(_T("DeleteFile(%s) failed"), filepathUnpacked[2].c_str())); }
 
                if (!pCtxt->m_bIgnoreCodepage && 
@@ -444,9 +444,9 @@ exitPrepAndCompare:
                if (m_pBinaryCompare == NULL)
                        m_pBinaryCompare.reset(new BinaryCompare());
 
-               PathContext files;
-               GetComparePaths(pCtxt, di, files);
-               code = m_pBinaryCompare->CompareFiles(files, di);
+               PathContext tFiles;
+               GetComparePaths(pCtxt, di, tFiles);
+               code = m_pBinaryCompare->CompareFiles(tFiles, di);
        }
        else if (nCompMethod == CMP_DATE || nCompMethod == CMP_DATE_SIZE || nCompMethod == CMP_SIZE)
        {
@@ -473,22 +473,22 @@ exitPrepAndCompare:
  * @param [out] right Gets the right compare path.
  * @note If item is unique, same path is returned for both.
  */
-void GetComparePaths(CDiffContext * pCtxt, const DIFFITEM &di, PathContext & files)
+void GetComparePaths(CDiffContext * pCtxt, const DIFFITEM &di, PathContext & tFiles)
 {
        int nDirs = pCtxt->GetCompareDirs();
 
-       files.SetSize(nDirs);
+       tFiles.SetSize(nDirs);
 
        for (int nIndex = 0; nIndex < nDirs; nIndex++)
        {
                if (di.diffcode.exists(nIndex))
                {
-                       files.SetPath(nIndex,
+                       tFiles.SetPath(nIndex,
                                paths::ConcatPath(pCtxt->GetPath(nIndex), di.diffFileInfo[nIndex].GetFile()), false);
                }
                else
                {
-                       files.SetPath(nIndex, _T("NUL"), false);
+                       tFiles.SetPath(nIndex, _T("NUL"), false);
                }
        }
 }
index 6fcf4e2..aa310fd 100644 (file)
@@ -896,9 +896,9 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
 
        Merge7zFormatMergePluginScope scope(infoUnpacker);
 
-       PathContext files;
+       PathContext tFiles;
        if (pFiles)
-               files = *pFiles;
+               tFiles = *pFiles;
        bool bRO[3] = {0};
        if (dwFlags)
        {
@@ -908,7 +908,7 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
        };
 
        // pop up dialog unless arguments exist (and are compatible)
-       paths::PATH_EXISTENCE pathsType = paths::GetPairComparability(files, IsArchiveFile);
+       paths::PATH_EXISTENCE pathsType = paths::GetPairComparability(tFiles, IsArchiveFile);
        if (pathsType == paths::DOES_NOT_EXIST)
        {
                if (!m_pMenus[MENU_OPENVIEW])
@@ -920,7 +920,7 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
                        pOpenDoc->m_dwFlags[1] = dwFlags[1];
                        pOpenDoc->m_dwFlags[2] = dwFlags[2];
                }
-               pOpenDoc->m_files = files;
+               pOpenDoc->m_files = tFiles;
                pOpenDoc->m_bRecurse = bRecurse;
                if (infoUnpacker)
                        pOpenDoc->m_infoHandler = *infoUnpacker;
@@ -933,34 +933,34 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
                // Add trailing '\' for directories if its missing
                if (pathsType == paths::IS_EXISTING_DIR)
                {
-                       if (!paths::EndsWithSlash(files[0]) && !IsArchiveFile(files[0]))
-                               files[0] = paths::AddTrailingSlash(files[0]);
-                       if (!paths::EndsWithSlash(files[1]) && !IsArchiveFile(files[1]))
-                               files[1] = paths::AddTrailingSlash(files[1]);
-                       if (files.GetSize() == 3 && !paths::EndsWithSlash(files[2]) && !IsArchiveFile(files[1]))
-                               files[2] = paths::AddTrailingSlash(files[2]);
+                       if (!paths::EndsWithSlash(tFiles[0]) && !IsArchiveFile(tFiles[0]))
+                               tFiles[0] = paths::AddTrailingSlash(tFiles[0]);
+                       if (!paths::EndsWithSlash(tFiles[1]) && !IsArchiveFile(tFiles[1]))
+                               tFiles[1] = paths::AddTrailingSlash(tFiles[1]);
+                       if (tFiles.GetSize() == 3 && !paths::EndsWithSlash(tFiles[2]) && !IsArchiveFile(tFiles[1]))
+                               tFiles[2] = paths::AddTrailingSlash(tFiles[2]);
                }
 
                //save the MRU left and right files.
                if (dwFlags)
                {
                        if (!(dwFlags[0] & FFILEOPEN_NOMRU))
-                               addToMru(files[0].c_str(), _T("Files\\Left"));
+                               addToMru(tFiles[0].c_str(), _T("Files\\Left"));
                        if (!(dwFlags[1] & FFILEOPEN_NOMRU))
-                               addToMru(files[1].c_str(), _T("Files\\Right"));
-                       if (files.GetSize() == 3 && !(dwFlags[2] & FFILEOPEN_NOMRU))
-                               addToMru(files[2].c_str(), _T("Files\\Option"));
+                               addToMru(tFiles[1].c_str(), _T("Files\\Right"));
+                       if (tFiles.GetSize() == 3 && !(dwFlags[2] & FFILEOPEN_NOMRU))
+                               addToMru(tFiles[2].c_str(), _T("Files\\Option"));
                }
        }
 
        CTempPathContext *pTempPathContext = NULL;
        if (pathsType == paths::IS_EXISTING_DIR)
        {
-               DecompressResult res= DecompressArchive(m_hWnd, files);
+               DecompressResult res= DecompressArchive(m_hWnd, tFiles);
                if (res.pTempPathContext)
                {
                        pathsType = res.pathsType;
-                       files = res.files;
+                       tFiles = res.files;
                        pTempPathContext = res.pTempPathContext;
                }
        }
@@ -971,7 +971,7 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
        {
                if (pathsType == paths::IS_EXISTING_DIR)
                {
-                       CDirDoc::m_nDirsTemp = files.GetSize();
+                       CDirDoc::m_nDirsTemp = tFiles.GetSize();
                        if (!m_pMenus[MENU_DIRVIEW])
                                theApp.m_pDirTemplate->m_hMenuShared = NewDirViewMenu();
                        pDirDoc = static_cast<CDirDoc*>(theApp.m_pDirTemplate->OpenDocumentFile(NULL));
@@ -987,18 +987,18 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
        {
                if (pDirDoc)
                {
-                       if (files.GetSize() == 3)
+                       if (tFiles.GetSize() == 3)
                        {
                                AfxMessageBox(_T("3-way folder compare feature is in progress"), MB_ICONWARNING | MB_DONT_ASK_AGAIN);
                        }
                        // Anything that can go wrong inside InitCompare() will yield an
                        // exception. There is no point in checking return value.
-                       pDirDoc->InitCompare(files, bRecurse, pTempPathContext);
+                       pDirDoc->InitCompare(tFiles, bRecurse, pTempPathContext);
 
                        pDirDoc->SetReportFile(sReportFile);
                        pDirDoc->SetDescriptions(strDesc);
                        pDirDoc->SetTitle(NULL);
-                       for (int nIndex = 0; nIndex < files.GetSize(); nIndex++)
+                       for (int nIndex = 0; nIndex < tFiles.GetSize(); nIndex++)
                                pDirDoc->SetReadOnly(nIndex, bRO[nIndex]);
 
                        pDirDoc->Rescan();
@@ -1008,16 +1008,16 @@ BOOL CMainFrame::DoFileOpen(const PathContext * pFiles /*=NULL*/,
        {               
                FileLocation fileloc[3];
 
-               for (int nPane = 0; nPane < files.GetSize(); nPane++)
-                       fileloc[nPane].setPath(files[nPane]);
+               for (int nPane = 0; nPane < tFiles.GetSize(); nPane++)
+                       fileloc[nPane].setPath(tFiles[nPane]);
 
                if (!prediffer.empty())
                {
-                       String strBothFilenames = strutils::join(files.begin(), files.end(), _T("|"));
+                       String strBothFilenames = strutils::join(tFiles.begin(), tFiles.end(), _T("|"));
                        pDirDoc->GetPluginManager().SetPrediffer(strBothFilenames, prediffer);
                }
 
-               ShowAutoMergeDoc(pDirDoc, files.GetSize(), fileloc, dwFlags, strDesc, sReportFile,
+               ShowAutoMergeDoc(pDirDoc, tFiles.GetSize(), fileloc, dwFlags, strDesc, sReportFile,
                                infoUnpacker);
        }
 
@@ -1363,8 +1363,8 @@ void CMainFrame::OnToolsGeneratePatch()
 
 void CMainFrame::OnDropFiles(const std::vector<String>& dropped_files)
 {
-       PathContext files(dropped_files);
-       const size_t fileCount = files.GetSize();
+       PathContext tFiles(dropped_files);
+       const size_t fileCount = tFiles.GetSize();
 
        // If Ctrl pressed, do recursive compare
        bool recurse = !!::GetAsyncKeyState(VK_CONTROL) || GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
@@ -1373,26 +1373,26 @@ void CMainFrame::OnDropFiles(const std::vector<String>& dropped_files)
        // assume it is an archive and set filenames to same
        if (::GetAsyncKeyState(VK_SHIFT) < 0 && fileCount == 1)
        {
-               files.SetRight(files[0]);
+               tFiles.SetRight(tFiles[0]);
        }
 
        // Check if they dropped a project file
        DWORD dwFlags[3] = {FFILEOPEN_NONE, FFILEOPEN_NONE, FFILEOPEN_NONE};
        if (fileCount == 1)
        {
-               if (theApp.IsProjectFile(files[0]))
+               if (theApp.IsProjectFile(tFiles[0]))
                {
-                       theApp.LoadAndOpenProjectFile(files[0]);
+                       theApp.LoadAndOpenProjectFile(tFiles[0]);
                        return;
                }
-               if (IsConflictFile(files[0]))
+               if (IsConflictFile(tFiles[0]))
                {
-                       DoOpenConflict(files[0], nullptr, true);
+                       DoOpenConflict(tFiles[0], nullptr, true);
                        return;
                }
        }
 
-       DoFileOpen(&files, dwFlags, NULL, _T(""), recurse);
+       DoFileOpen(&tFiles, dwFlags, NULL, _T(""), recurse);
 }
 
 void CMainFrame::OnPluginUnpackMode(UINT nID )
index 35629d9..ca3af33 100644 (file)
@@ -1181,12 +1181,12 @@ bool CMergeApp::LoadAndOpenProjectFile(const String& sProject, const String& sRe
        if (!LoadProjectFile(sProject, project))
                return false;
        
-       PathContext files;
+       PathContext tFiles;
        BOOL bLeftReadOnly = FALSE;
        BOOL bMiddleReadOnly = FALSE;
        BOOL bRightReadOnly = FALSE;
        bool bRecursive = FALSE;
-       project.GetPaths(files, bRecursive);
+       project.GetPaths(tFiles, bRecursive);
        bLeftReadOnly = project.GetLeftReadOnly();
        bMiddleReadOnly = project.GetMiddleReadOnly();
        bRightReadOnly = project.GetRightReadOnly();
@@ -1200,13 +1200,13 @@ bool CMergeApp::LoadAndOpenProjectFile(const String& sProject, const String& sRe
                bRecursive = project.GetSubfolders() > 0;
 
        DWORD dwFlags[3] = {
-               static_cast<DWORD>(files.GetPath(0).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT),
-               static_cast<DWORD>(files.GetPath(1).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT),
-               static_cast<DWORD>(files.GetPath(2).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT)
+               static_cast<DWORD>(tFiles.GetPath(0).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT),
+               static_cast<DWORD>(tFiles.GetPath(1).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT),
+               static_cast<DWORD>(tFiles.GetPath(2).empty() ? FFILEOPEN_NONE : FFILEOPEN_PROJECT)
        };
        if (bLeftReadOnly)
                dwFlags[0] |= FFILEOPEN_READONLY;
-       if (files.GetSize() == 2)
+       if (tFiles.GetSize() == 2)
        {
                if (bRightReadOnly)
                        dwFlags[1] |= FFILEOPEN_READONLY;
@@ -1221,7 +1221,7 @@ bool CMergeApp::LoadAndOpenProjectFile(const String& sProject, const String& sRe
 
        GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, bRecursive);
        
-       BOOL rtn = GetMainFrame()->DoFileOpen(&files, dwFlags, NULL, sReportFile, bRecursive);
+       BOOL rtn = GetMainFrame()->DoFileOpen(&tFiles, dwFlags, NULL, sReportFile, bRecursive);
 
        AddToRecentProjectsMRU(sProject.c_str());
        return !!rtn;
index 9a1f421..49e95ce 100644 (file)
@@ -219,16 +219,16 @@ public:
        std::vector<CMergeEditView *> GetViewList(int nGroup = -1, int nBuffer = -1) const {
                std::vector<CMergeEditView *> list;
                if (nGroup != -1)
-                       for (int nBuffer = 0; nBuffer < m_nBuffers; ++nBuffer)
-                               list.push_back(m_pView[nGroup][nBuffer]);
+                       for (int nBuffer2 = 0; nBuffer2 < m_nBuffers; ++nBuffer2)
+                               list.push_back(m_pView[nGroup][nBuffer2]);
                else if (nBuffer != -1)
-                       for (int nGroup = 0; nGroup < m_nGroups; ++nGroup)
-                               list.push_back(m_pView[nGroup][nBuffer]);
+                       for (int nGroup2 = 0; nGroup2 < m_nGroups; ++nGroup2)
+                               list.push_back(m_pView[nGroup2][nBuffer]);
                else
                {
-                       for (int nGroup = 0; nGroup < m_nGroups; nGroup++)
-                               for (int nBuffer = 0; nBuffer < m_nBuffers; ++nBuffer)
-                                       list.push_back(m_pView[nGroup][nBuffer]);
+                       for (int nGroup3 = 0; nGroup3 < m_nGroups; nGroup3++)
+                               for (int nBuffer3 = 0; nBuffer3 < m_nBuffers; ++nBuffer3)
+                                       list.push_back(m_pView[nGroup3][nBuffer3]);
                }
                return list;
        }
index dba29f9..1fe2b05 100644 (file)
@@ -116,10 +116,10 @@ BOOL CMergeEditSplitterView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowNam
        {
                for (int nBuffer = 0; nBuffer < pDoc->m_nBuffers; nBuffer++)
                {
-                       CMergeEditView *pView = pDoc->GetView(pDoc->m_nGroups - 1, nBuffer);
-                       pView->SendMessage(WM_INITIALUPDATE);
-                       pView->CopyProperties(pDoc->GetView(0, nBuffer));
-                       pView->SetStatusInterface(pDoc->GetView(0, nBuffer)->m_piMergeEditStatus);
+                       CMergeEditView *pView2 = pDoc->GetView(pDoc->m_nGroups - 1, nBuffer);
+                       pView2->SendMessage(WM_INITIALUPDATE);
+                       pView2->CopyProperties(pDoc->GetView(0, nBuffer));
+                       pView2->SetStatusInterface(pDoc->GetView(0, nBuffer)->m_piMergeEditStatus);
                }
                m_wndSplitter.RecalcLayout();
        }
index 7fc3614..2ef43d2 100644 (file)
@@ -3947,15 +3947,15 @@ void CMergeEditView::OnViewZoomNormal()
        ZoomText(0);
 }
 
-void CMergeEditView::OnDropFiles(const std::vector<String>& files)
+void CMergeEditView::OnDropFiles(const std::vector<String>& tFiles)
 {
-       if (files.size() > 1 || paths::IsDirectory(files[0]))
+       if (tFiles.size() > 1 || paths::IsDirectory(tFiles[0]))
        {
-               GetMainFrame()->GetDropHandler()->GetCallback()(files);
+               GetMainFrame()->GetDropHandler()->GetCallback()(tFiles);
                return;
        }
 
-       GetDocument()->ChangeFile(m_nThisPane, files[0]);
+       GetDocument()->ChangeFile(m_nThisPane, tFiles[0]);
 }
 
 void CMergeEditView::OnWindowSplit()
index 4eea062..8136786 100644 (file)
@@ -110,10 +110,10 @@ void CPatchDlg::OnOK()
        size_t selectCount = m_fileList.size();
        if (selectCount == 0)
        {
-               PATCHFILES files;
-               files.lfile = m_file1;
-               files.rfile = m_file2;
-               AddItem(files);
+               PATCHFILES tFiles;
+               tFiles.lfile = m_file1;
+               tFiles.rfile = m_file2;
+               AddItem(tFiles);
                selectCount = 1;
        }
        if (selectCount == 1)
@@ -131,14 +131,14 @@ void CPatchDlg::OnOK()
                        return;
                }
 
-               PATCHFILES files = m_fileList[0];
-               if (files.lfile != m_file1 && !files.pathLeft.empty())
-                       files.pathLeft = _T("");
-               if (files.rfile != m_file2 && !files.pathRight.empty())
-                       files.pathRight = _T("");
-               files.lfile = m_file1;
-               files.rfile = m_file2;
-               m_fileList[0] = files;
+               PATCHFILES tFiles = m_fileList[0];
+               if (tFiles.lfile != m_file1 && !tFiles.pathLeft.empty())
+                       tFiles.pathLeft = _T("");
+               if (tFiles.rfile != m_file2 && !tFiles.pathRight.empty())
+                       tFiles.pathRight = _T("");
+               tFiles.lfile = m_file1;
+               tFiles.rfile = m_file2;
+               m_fileList[0] = tFiles;
        }
 
        // Check that result (patch) file is absolute path
@@ -224,11 +224,11 @@ BOOL CPatchDlg::OnInitDialog()
        // If one file added, show filenames on dialog
        if (count == 1)
        {
-        const PATCHFILES& files = m_fileList.front();
-               m_file1 = files.lfile;
-               m_ctlFile1.SetWindowText(files.lfile.c_str());
-               m_file2 = files.rfile;
-               m_ctlFile2.SetWindowText(files.rfile.c_str());
+        const PATCHFILES& tFiles = m_fileList.front();
+               m_file1 = tFiles.lfile;
+               m_ctlFile1.SetWindowText(tFiles.lfile.c_str());
+               m_file2 = tFiles.rfile;
+               m_ctlFile2.SetWindowText(tFiles.rfile.c_str());
        }
        else if (count > 1)     // Multiple files added, show number of files
        {
@@ -331,8 +331,6 @@ void CPatchDlg::OnSelchangeDiffStyle()
  */
 void CPatchDlg::OnDiffSwapFiles()
 {
-       PATCHFILES files;
-
        CString cstrFile1 = m_file1.c_str();
        CString cstrFile2 = m_file2.c_str();
        m_ctlFile1.GetWindowText(cstrFile1);
index 070f09d..9938ea3 100644 (file)
@@ -54,12 +54,12 @@ CPatchTool::~CPatchTool()
  */
 void CPatchTool::AddFiles(const String &file1, const String &file2)
 {
-       PATCHFILES files;
-       files.lfile = file1;
-       files.rfile = file2;
+       PATCHFILES tFiles;
+       tFiles.lfile = file1;
+       tFiles.rfile = file2;
 
        // TODO: Read and add file's timestamps
-       m_fileList.push_back(files);
+       m_fileList.push_back(tFiles);
 }
 
 /**
@@ -76,14 +76,14 @@ void CPatchTool::AddFiles(const String &file1, const String &file2)
 void CPatchTool::AddFiles(const String &file1, const String &altPath1,
                const String &file2, const String &altPath2)
 {
-       PATCHFILES files;
-       files.lfile = file1;
-       files.rfile = file2;
-       files.pathLeft = altPath1;
-       files.pathRight = altPath2;
+       PATCHFILES tFiles;
+       tFiles.lfile = file1;
+       tFiles.rfile = file2;
+       tFiles.pathLeft = altPath1;
+       tFiles.pathRight = altPath2;
 
        // TODO: Read and add file's timestamps
-       m_fileList.push_back(files);
+       m_fileList.push_back(tFiles);
 }
 
 /** 
@@ -126,14 +126,14 @@ int CPatchTool::CreatePatch()
 
                for (size_t index = 0; index < fileCount; index++)
                {
-                       const PATCHFILES& files = dlgPatch.GetItemAt(index);
-                       String filename1 = files.lfile.length() == 0 ? _T("NUL") : files.lfile;
-                       String filename2 = files.rfile.length() == 0 ? _T("NUL") : files.rfile;
+                       const PATCHFILES& tFiles = dlgPatch.GetItemAt(index);
+                       String filename1 = tFiles.lfile.length() == 0 ? _T("NUL") : tFiles.lfile;
+                       String filename2 = tFiles.rfile.length() == 0 ? _T("NUL") : tFiles.rfile;
                        
                        // Set up DiffWrapper
                        m_diffWrapper.SetPaths(PathContext(filename1, filename2), false);
-                       m_diffWrapper.SetAlternativePaths(PathContext(files.pathLeft, files.pathRight));
-                       m_diffWrapper.SetCompareFiles(PathContext(files.lfile, files.rfile));
+                       m_diffWrapper.SetAlternativePaths(PathContext(tFiles.pathLeft, tFiles.pathRight));
+                       m_diffWrapper.SetCompareFiles(PathContext(tFiles.lfile, tFiles.rfile));
                        bool bDiffSuccess = m_diffWrapper.RunFileDiff();
                        m_diffWrapper.GetDiffStatus(&status);
 
index be1a8a5..3b3f3fc 100644 (file)
@@ -31,11 +31,11 @@ String getProjectRoot()
 TEST(CodepageTest, UCS2)\r
 {\r
        String projectRoot = getProjectRoot();\r
-       PathContext files = {\r
+       PathContext tFiles = {\r
                paths::ConcatPath(projectRoot, L"Testing/Data/Unicode/UCS-2BE/DiffItem.h"),\r
                paths::ConcatPath(projectRoot, L"Testing/Data/Unicode/UCS-2LE/DiffItem.h")\r
        };\r
-       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&files));\r
+       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&tFiles));\r
        CFrameWnd *pFrame = GetMainFrame()->GetActiveFrame();\r
        CMergeDoc *pDoc = dynamic_cast<CMergeDoc *>(pFrame->GetActiveDocument());\r
        ASSERT_NE(nullptr, pDoc);\r
@@ -49,11 +49,11 @@ TEST(CodepageTest, UCS2)
 TEST(CodepageTest, UTF8)\r
 {\r
        String projectRoot = getProjectRoot();\r
-       PathContext files = {\r
+       PathContext tFiles = {\r
                paths::ConcatPath(projectRoot, L"Testing/Data/Unicode/UTF-8/DiffItem.h"),\r
                paths::ConcatPath(projectRoot, L"Testing/Data/Unicode/UTF-8-NOBOM/DiffItem.h")\r
        };\r
-       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&files));\r
+       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&tFiles));\r
        CFrameWnd *pFrame = GetMainFrame()->GetActiveFrame();\r
        CMergeDoc *pDoc = dynamic_cast<CMergeDoc *>(pFrame->GetActiveDocument());\r
        EXPECT_NE(nullptr, pDoc);\r
@@ -69,13 +69,13 @@ TEST(CodepageTest, UTF8)
 TEST(SyntaxHighlight, Verilog)\r
 {\r
        String projectRoot = getProjectRoot();\r
-       PathContext files = {\r
+       PathContext tFiles = {\r
                paths::ConcatPath(projectRoot, L"Testing/FileFormats/Verilog.v"),\r
                paths::ConcatPath(projectRoot, L"Testing/FileFormats/Verilog.v")\r
        };\r
        CMessageBoxDialog dlg(nullptr, IDS_FILESSAME, 0U, 0U, IDS_FILESSAME);\r
        const int nPrevFormerResult = dlg.SetFormerResult(IDOK);\r
-       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&files));\r
+       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&tFiles));\r
        CFrameWnd *pFrame = GetMainFrame()->GetActiveFrame();\r
        CMergeDoc *pDoc = dynamic_cast<CMergeDoc *>(pFrame->GetActiveDocument());\r
        EXPECT_NE(nullptr, pDoc);\r
@@ -254,13 +254,13 @@ TEST(ImageCompareTest, Open)
                return;\r
 \r
        String projectRoot = getProjectRoot();\r
-       PathContext files = {\r
+       PathContext tFiles = {\r
                paths::ConcatPath(projectRoot, L"Src/res/right_to_middle.bmp"),\r
                paths::ConcatPath(projectRoot, L"Src/res/right_to_left.bmp")\r
        };\r
        CMessageBoxDialog dlg(nullptr, IDS_FILESSAME, 0U, 0U, IDS_FILESSAME);\r
        const int nPrevFormerResult = dlg.SetFormerResult(IDOK);\r
-       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&files));\r
+       EXPECT_TRUE(!!GetMainFrame()->DoFileOpen(&tFiles));\r
        CFrameWnd *pFrame = GetMainFrame()->GetActiveFrame();\r
        CImgMergeFrame *pDoc = dynamic_cast<CImgMergeFrame *>(pFrame);\r
        EXPECT_NE(nullptr, pDoc);\r