Clone
ixen
committed
on 11 Dec 20
Changed the way size stats are being presented (CH-368)
src/libchengine/TSubTaskArray.cpp (+0 -1)
183 183                 }
184 184
185 185                 return eResult;
186 186         }
187 187
188 188         bool TSubTasksArray::AreAllBasePathsProcessed() const
189 189         {
190 190                 return m_rSubTaskContext.GetBasePaths()->AllMarkedAsSkipFurtherProcessing();
191 191         }
192 192
193 193         void TSubTasksArray::AddSubTask(const TSubTaskBasePtr& spOperation, bool bIsPartOfEstimation)
194 194         {
195 195                 m_vSubTasks.push_back(std::make_pair(spOperation, bIsPartOfEstimation));
196 196         }
197 197
198 198         void TSubTasksArray::GetStatsSnapshot(TSubTaskArrayStatsSnapshot& rSnapshot) const
199 199         {
200 200                 rSnapshot.Clear();
201 201
202 202                 // current task
203                   // ugly const_cast - const method, non-const interlocked intrinsic and we're really not modifying the member...
204 203                 object_id_t oidIndex = m_oidSubOperationIndex.load(std::memory_order_acquire);
205 204                 rSnapshot.SetCurrentSubtaskIndex(oidIndex);
206 205
207 206                 // progress
208 207                 for (size_t stSubOperationIndex = 0; stSubOperationIndex < m_vSubTasks.size(); ++stSubOperationIndex)
209 208                 {
210 209                         const std::pair<TSubTaskBasePtr, bool>& rCurrentSubTask = m_vSubTasks[stSubOperationIndex];
211 210                         TSubTaskBasePtr spCurrentSubTask = rCurrentSubTask.first;
212 211
213 212                         TSubTaskStatsSnapshotPtr spSubtaskSnapshot(new TSubTaskStatsSnapshot);
214 213
215 214                         spCurrentSubTask->GetStatsSnapshot(spSubtaskSnapshot);
216 215                         rSnapshot.AddSubTaskSnapshot(spSubtaskSnapshot);
217 216                 }
218 217         }
219 218
220 219         EOperationType TSubTasksArray::GetOperationType() const
221 220         {
222 221                 return m_eOperationType;
223 222         }