USES_CONVERSION;\r
// Handle archives using 7-zip\r
Merge7z::Format *piHandler;\r
- if (piHandler = ArchiveGuessFormat(res.files[0]))\r
+ piHandler = ArchiveGuessFormat(res.files[0]);\r
+ if (piHandler)\r
{\r
res.pTempPathContext = new CTempPathContext;\r
path = env::GetTempChildPath();\r
SysFreeString(pTmp);\r
res.files[0].insert(0, _T("\\"));\r
res.files[0].insert(0, path);\r
- } while (piHandler = ArchiveGuessFormat(res.files[0]));\r
+ piHandler = ArchiveGuessFormat(res.files[0]);\r
+ } while (piHandler);\r
res.files[0] = path;\r
}\r
- if (!res.files[1].empty() && (piHandler = ArchiveGuessFormat(res.files[1])))\r
+ piHandler = res.files[1].empty() ? nullptr\r
+ : ArchiveGuessFormat(res.files[1]);\r
+ if (piHandler)\r
{\r
if (!res.pTempPathContext)\r
{\r
SysFreeString(pTmp);\r
res.files[1].insert(0, _T("\\"));\r
res.files[1].insert(0, path);\r
- } while (piHandler = ArchiveGuessFormat(res.files[1]));\r
+ piHandler = ArchiveGuessFormat(res.files[1]);\r
+ } while (piHandler);\r
res.files[1] = path;\r
}\r
- if (res.files.GetSize() > 2 && (piHandler = ArchiveGuessFormat(res.files[2])))\r
+ piHandler = (res.files.GetSize() <= 2) ? nullptr : ArchiveGuessFormat(res.files[2]);\r
+ if (piHandler)\r
{\r
if (!res.pTempPathContext)\r
{\r
SysFreeString(pTmp);\r
res.files[2].insert(0, _T("\\"));\r
res.files[2].insert(0, path);\r
- } while (piHandler = ArchiveGuessFormat(res.files[2]));\r
+ piHandler = ArchiveGuessFormat(res.files[2]);\r
+ } while (piHandler);\r
res.files[2] = path;\r
}\r
if (res.files[1].empty())\r
{
if (bLModified && dlg.m_leftSave == SaveClosingDlg::SAVECLOSING_SAVE)
{
- if (!(bLSaveSuccess = DoFileSave(0)))
+ bLSaveSuccess = DoFileSave(0);
+ if (!bLSaveSuccess)
result = false;
}
if (bMModified && dlg.m_middleSave == SaveClosingDlg::SAVECLOSING_SAVE)
{
- if (!(bMSaveSuccess = DoFileSave(1)))
+ bMSaveSuccess = DoFileSave(1);
+ if (!bMSaveSuccess)
result = false;
}
if (bRModified && dlg.m_rightSave == SaveClosingDlg::SAVECLOSING_SAVE)
{
- if (!(bRSaveSuccess = DoFileSave(m_pImgMergeWindow->GetPaneCount() - 1)))
+ bRSaveSuccess = DoFileSave(m_pImgMergeWindow->GetPaneCount() - 1);
+ if (!bRSaveSuccess)
result = false;
}
}
if (!WMrunning(processIDs, pid))
{
tempfolderPID = paths::ConcatPath(paths::GetParentPath(pattern), ff.cFileName);
- if (res = ClearTempfolder(tempfolderPID))
+ res = ClearTempfolder(tempfolderPID);
+ if (res)
bok = !!FindNextFile(h, &ff) ;
continue;
}