Index: src/libchcore/TSubTaskScanDirectory.cpp =================================================================== diff -u -N -r2fe97a93f21771d75901d4b6559057d1ea055104 -ra44714d5c7ec0f50a376f4d0ea919ee5a224f834 --- src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision 2fe97a93f21771d75901d4b6559057d1ea055104) +++ src/libchcore/TSubTaskScanDirectory.cpp (.../TSubTaskScanDirectory.cpp) (revision a44714d5c7ec0f50a376f4d0ea919ee5a224f834) @@ -46,50 +46,36 @@ // class TScanDirectoriesProgressInfo TScanDirectoriesProgressInfo::TScanDirectoriesProgressInfo() : - m_stCurrentIndex(0) + m_fcCurrentIndex(0) { } TScanDirectoriesProgressInfo::~TScanDirectoriesProgressInfo() { } -/* - void TScanDirectoriesProgressInfo::Serialize(TReadBinarySerializer& rSerializer) - { - boost::unique_lock lock(m_lock); - Serializers::Serialize(rSerializer, m_stCurrentIndex); - } - - void TScanDirectoriesProgressInfo::Serialize(TWriteBinarySerializer& rSerializer) const - { - boost::shared_lock lock(m_lock); - Serializers::Serialize(rSerializer, m_stCurrentIndex); - } -*/ - void TScanDirectoriesProgressInfo::ResetProgress() { boost::unique_lock lock(m_lock); - m_stCurrentIndex = 0; + m_fcCurrentIndex = 0; } - void TScanDirectoriesProgressInfo::SetCurrentIndex(size_t stIndex) + void TScanDirectoriesProgressInfo::SetCurrentIndex(file_count_t fcIndex) { boost::unique_lock lock(m_lock); - m_stCurrentIndex = stIndex; + m_fcCurrentIndex = fcIndex; } void TScanDirectoriesProgressInfo::IncreaseCurrentIndex() { boost::unique_lock lock(m_lock); - ++m_stCurrentIndex; + ++m_fcCurrentIndex; } - size_t TScanDirectoriesProgressInfo::GetCurrentIndex() const + file_count_t TScanDirectoriesProgressInfo::GetCurrentIndex() const { boost::shared_lock lock(m_lock); - return m_stCurrentIndex; + return m_fcCurrentIndex; } } @@ -148,18 +134,18 @@ bool bRetry = true; bool bSkipInputPath = false; - size_t stSize = spBasePaths->GetCount(); + file_count_t fcSize = spBasePaths->GetCount(); // NOTE: in theory, we should resume the scanning, but in practice we are always restarting scanning if interrupted. - size_t stIndex = 0; // m_tProgressInfo.GetCurrentIndex() - for(; stIndex < stSize; stIndex++) + file_count_t fcIndex = 0; // m_tProgressInfo.GetCurrentIndex() + for(; fcIndex < fcSize; fcIndex++) { - TBasePathDataPtr spBasePath = spBasePaths->GetAt(stIndex); + TBasePathDataPtr spBasePath = spBasePaths->GetAt(fcIndex); TSmartPath pathCurrent = spBasePath->GetSrcPath(); - m_tProgressInfo.SetCurrentIndex(stIndex); + m_tProgressInfo.SetCurrentIndex(fcIndex); // new stats - m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetProcessedCount(fcIndex); m_tSubTaskStats.SetCurrentPath(pathCurrent.ToString()); bSkipInputPath = false; @@ -261,10 +247,10 @@ } // calc size of all files - m_tProgressInfo.SetCurrentIndex(stIndex); + m_tProgressInfo.SetCurrentIndex(fcIndex); // new stats - m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetProcessedCount(fcIndex); m_tSubTaskStats.SetCurrentPath(TString()); rFilesCache.SetComplete(true);