Index: src/libchcore/TSubTaskFastMove.cpp =================================================================== diff -u -N -r2fe97a93f21771d75901d4b6559057d1ea055104 -ra44714d5c7ec0f50a376f4d0ea919ee5a224f834 --- src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision 2fe97a93f21771d75901d4b6559057d1ea055104) +++ src/libchcore/TSubTaskFastMove.cpp (.../TSubTaskFastMove.cpp) (revision a44714d5c7ec0f50a376f4d0ea919ee5a224f834) @@ -46,8 +46,8 @@ // class TFastMoveProgressInfo TFastMoveProgressInfo::TFastMoveProgressInfo() : - m_stCurrentIndex(0), - m_stLastStoredIndex(std::numeric_limits::max()) + m_fcCurrentIndex(0), + m_fcLastStoredIndex((file_count_t)-1) { } @@ -58,55 +58,55 @@ void TFastMoveProgressInfo::ResetProgress() { boost::unique_lock lock(m_lock); - m_stCurrentIndex = 0; + m_fcCurrentIndex = 0; } - void TFastMoveProgressInfo::SetCurrentIndex(size_t stIndex) + void TFastMoveProgressInfo::SetCurrentIndex(file_count_t fcIndex) { boost::unique_lock lock(m_lock); - m_stCurrentIndex = stIndex; + m_fcCurrentIndex = fcIndex; } void TFastMoveProgressInfo::IncreaseCurrentIndex() { boost::unique_lock lock(m_lock); - ++m_stCurrentIndex; + ++m_fcCurrentIndex; } - size_t TFastMoveProgressInfo::GetCurrentIndex() const + file_count_t TFastMoveProgressInfo::GetCurrentIndex() const { boost::shared_lock lock(m_lock); - return m_stCurrentIndex; + return m_fcCurrentIndex; } void TFastMoveProgressInfo::Store(ISerializerRowData& rRowData) const { boost::shared_lock lock(m_lock); - if(m_stCurrentIndex != m_stLastStoredIndex) + if(m_fcCurrentIndex != m_fcLastStoredIndex) { - rRowData.SetValue(_T("current_index"), m_stCurrentIndex); - m_stLastStoredIndex = m_stCurrentIndex; + rRowData.SetValue(_T("current_index"), m_fcCurrentIndex); + m_fcLastStoredIndex = m_fcCurrentIndex; } } void TFastMoveProgressInfo::InitColumns(IColumnsDefinition& rColumns) { - rColumns.AddColumn(_T("id"), IColumnsDefinition::eType_ulonglong); - rColumns.AddColumn(_T("current_index"), IColumnsDefinition::eType_ulonglong); + rColumns.AddColumn(_T("id"), ColumnType::value); + rColumns.AddColumn(_T("current_index"), ColumnType::value); } void TFastMoveProgressInfo::Load(const ISerializerRowReaderPtr& spRowReader) { boost::unique_lock lock(m_lock); - spRowReader->GetValue(_T("current_index"), m_stCurrentIndex); - m_stLastStoredIndex = m_stCurrentIndex; + spRowReader->GetValue(_T("current_index"), m_fcCurrentIndex); + m_fcLastStoredIndex = m_fcCurrentIndex; } bool TFastMoveProgressInfo::WasSerialized() const { boost::shared_lock lock(m_lock); - return m_stLastStoredIndex != std::numeric_limits::max(); + return m_fcLastStoredIndex != (file_count_t)-1; } } @@ -162,18 +162,18 @@ bool bRetry = true; bool bSkipInputPath = false; - size_t stSize = spBasePaths->GetCount(); - size_t stIndex = m_tProgressInfo.GetCurrentIndex(); - for(; stIndex < stSize ; stIndex++) + file_count_t fcSize = spBasePaths->GetCount(); + file_count_t fcIndex = m_tProgressInfo.GetCurrentIndex(); + for(; fcIndex < fcSize ; fcIndex++) { - TBasePathDataPtr spBasePath = spBasePaths->GetAt(stIndex); + TBasePathDataPtr spBasePath = spBasePaths->GetAt(fcIndex); TSmartPath pathCurrent = spBasePath->GetSrcPath(); // store currently processed index - m_tProgressInfo.SetCurrentIndex(stIndex); + m_tProgressInfo.SetCurrentIndex(fcIndex); // new stats - m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetProcessedCount(fcIndex); m_tSubTaskStats.SetCurrentPath(pathCurrent.ToString()); // retrieve base path data @@ -293,10 +293,10 @@ } } - m_tProgressInfo.SetCurrentIndex(stIndex); + m_tProgressInfo.SetCurrentIndex(fcIndex); // new stats - m_tSubTaskStats.SetProcessedCount(stIndex); + m_tSubTaskStats.SetProcessedCount(fcIndex); m_tSubTaskStats.SetCurrentPath(TString()); // log