Index: src/ch/FileFilter.cpp =================================================================== diff -u -r5057e08b0cc064972abeb94a488e5f12d9db14a0 -r22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1 --- src/ch/FileFilter.cpp (.../FileFilter.cpp) (revision 5057e08b0cc064972abeb94a488e5f12d9db14a0) +++ src/ch/FileFilter.cpp (.../FileFilter.cpp) (revision 22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1) @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2001-2008 by J�zef Starosczyk * + * Copyright (C) 2001-2008 by Jozef Starosczyk * * ixen@copyhandler.com * * * * This program is free software; you can redistribute it and/or modify * @@ -184,15 +184,15 @@ delete [] pszData; } -bool CFileFilter::Match(const CFileInfo& rInfo) const +bool CFileFilter::Match(const CFileInfoPtr& spInfo) const { // check by mask if(m_bUseMask) { bool bRes=false; for(std::vector::const_iterator iterMask = m_astrMask.begin(); iterMask != m_astrMask.end(); ++iterMask) { - if(MatchMask(*iterMask, rInfo.GetFileName())) + if(MatchMask(*iterMask, spInfo->GetFileName())) bRes = true; } if(!bRes) @@ -204,7 +204,7 @@ { for(std::vector::const_iterator iterExcludeMask = m_astrExcludeMask.begin(); iterExcludeMask != m_astrExcludeMask.end(); ++iterExcludeMask) { - if(MatchMask(*iterExcludeMask, rInfo.GetFileName())) + if(MatchMask(*iterExcludeMask, spInfo->GetFileName())) return false; } } @@ -215,23 +215,23 @@ switch (m_iSizeType1) { case LT: - if (m_ullSize1 <= rInfo.GetLength64()) + if (m_ullSize1 <= spInfo->GetLength64()) return false; break; case LE: - if (m_ullSize1 < rInfo.GetLength64()) + if (m_ullSize1 < spInfo->GetLength64()) return false; break; case EQ: - if (m_ullSize1 != rInfo.GetLength64()) + if (m_ullSize1 != spInfo->GetLength64()) return false; break; case GE: - if (m_ullSize1 > rInfo.GetLength64()) + if (m_ullSize1 > spInfo->GetLength64()) return false; break; case GT: - if (m_ullSize1 >= rInfo.GetLength64()) + if (m_ullSize1 >= spInfo->GetLength64()) return false; break; } @@ -242,23 +242,23 @@ switch (m_iSizeType2) { case LT: - if (m_ullSize2 <= rInfo.GetLength64()) + if (m_ullSize2 <= spInfo->GetLength64()) return false; break; case LE: - if (m_ullSize2 < rInfo.GetLength64()) + if (m_ullSize2 < spInfo->GetLength64()) return false; break; case EQ: - if (m_ullSize2 != rInfo.GetLength64()) + if (m_ullSize2 != spInfo->GetLength64()) return false; break; case GE: - if (m_ullSize2 > rInfo.GetLength64()) + if (m_ullSize2 > spInfo->GetLength64()) return false; break; case GT: - if (m_ullSize2 >= rInfo.GetLength64()) + if (m_ullSize2 >= spInfo->GetLength64()) return false; break; } @@ -272,13 +272,13 @@ switch (m_iDateType) { case DATE_CREATED: - tm=rInfo.GetCreationTime(); + tm=spInfo->GetCreationTime(); break; case DATE_MODIFIED: - tm=rInfo.GetLastWriteTime(); + tm=spInfo->GetLastWriteTime(); break; case DATE_LASTACCESSED: - tm=rInfo.GetLastAccessTime(); + tm=spInfo->GetLastAccessTime(); break; } @@ -367,15 +367,15 @@ // attributes if (m_bUseAttributes) { - if ( (m_iArchive == 1 && !rInfo.IsArchived()) || (m_iArchive == 0 && rInfo.IsArchived())) + if ( (m_iArchive == 1 && !spInfo->IsArchived()) || (m_iArchive == 0 && spInfo->IsArchived())) return false; - if ( (m_iReadOnly == 1 && !rInfo.IsReadOnly()) || (m_iReadOnly == 0 && rInfo.IsReadOnly())) + if ( (m_iReadOnly == 1 && !spInfo->IsReadOnly()) || (m_iReadOnly == 0 && spInfo->IsReadOnly())) return false; - if ( (m_iHidden == 1 && !rInfo.IsHidden()) || (m_iHidden == 0 && rInfo.IsHidden())) + if ( (m_iHidden == 1 && !spInfo->IsHidden()) || (m_iHidden == 0 && spInfo->IsHidden())) return false; - if ( (m_iSystem == 1 && !rInfo.IsSystem()) || (m_iSystem == 0 && rInfo.IsSystem())) + if ( (m_iSystem == 1 && !spInfo->IsSystem()) || (m_iSystem == 0 && spInfo->IsSystem())) return false; - if ( (m_iDirectory == 1 && !rInfo.IsDirectory()) || (m_iDirectory == 0 && rInfo.IsDirectory())) + if ( (m_iDirectory == 1 && !spInfo->IsDirectory()) || (m_iDirectory == 0 && spInfo->IsDirectory())) return false; } @@ -452,15 +452,15 @@ return *this; } -bool CFiltersArray::Match(const CFileInfo& rInfo) const +bool CFiltersArray::Match(const CFileInfoPtr& spInfo) const { if(m_vFilters.empty()) return true; // if only one of the filters matches - return true for(std::vector::const_iterator iterFilter = m_vFilters.begin(); iterFilter != m_vFilters.end(); iterFilter++) { - if((*iterFilter).Match(rInfo)) + if((*iterFilter).Match(spInfo)) return true; }