// Now handle the various cases of what was selected
- if (pos1 == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(pos1))
{
OpenSpecialItems(pos1, pos2, pos3);
return;
// Now handle the various cases of what was selected
- if (pos1 == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(pos1))
{
ASSERT(false);
return;
DIFFITEM *diffpos = GetItemKey(sel);
// If it is special item, return empty DIFFITEM
- if (diffpos == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(diffpos))
{
return *DIFFITEM::GetEmptyItem();
}
void CDirView::DeleteItem(int sel, bool removeDIFFITEM)
{
DIFFITEM *diffpos = GetItemKey(sel);
- if (diffpos == (DIFFITEM*)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(diffpos))
return;
if (m_bTreeMode)
{
void CDirView::GetItemFileNames(int sel, String& strLeft, String& strRight) const
{
DIFFITEM *diffpos = GetItemKey(sel);
- if (diffpos == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(diffpos))
{
strLeft.erase();
strRight.erase();
void CDirView::GetItemFileNames(int sel, PathContext * paths) const
{
DIFFITEM *diffpos = GetItemKey(sel);
- if (diffpos == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(diffpos))
{
for (int nIndex = 0; nIndex < GetDocument()->m_nDirs; nIndex++)
paths->SetPath(nIndex, _T(""));
if (!openableForDir)
{
const DIFFITEM& di1 = GetDiffItem(sel1);
- if (di1.diffcode.isDirectory() || GetItemKey(sel1) == reinterpret_cast<DIFFITEM*>(SPECIAL_ITEM_POS))
+ if (di1.diffcode.isDirectory() || IsDiffItemSpecial(GetItemKey(sel1)))
{
pCmdUI->Enable(FALSE);
return;
{
// Don't select special items (SPECIAL_ITEM_POS)
DIFFITEM *diffpos = GetItemKey(i);
- if (diffpos != (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (!IsDiffItemSpecial(diffpos))
m_pList->SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
}
}
{
// Don't show number to special items
DIFFITEM *pos = GetItemKey(focusItem);
- if (pos != (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (!IsDiffItemSpecial(pos))
{
// If compare is non-recursive reduce special items count
bool bRecursive = GetDiffContext().m_bRecursive;
for (int currRow = nRows - 1; currRow >= 0; currRow--)
{
DIFFITEM *pos = GetItemKey(currRow);
- if (pos == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(pos))
continue;
bool bFound = false;
int nIdx = pParam->item.iItem;
int i = m_pColItems->ColPhysToLog(pParam->item.iSubItem);
DIFFITEM *key = GetItemKey(nIdx);
- if (key == (DIFFITEM *)SPECIAL_ITEM_POS)
+ if (IsDiffItemSpecial(key))
{
if (m_pColItems->IsColName(i))
{