Clone
ixen
committed
on 13 Nov 20
Disabled boost warnings related to scope exit.
src/libchengine/TSubTaskCopyMove.cpp (+3 -0)
87 87                 if(fcCount == 0)
88 88                 {
89 89                         m_spSubTaskStats->SetCurrentPath(TString());
90 90                         return;
91 91                 }
92 92
93 93                 file_count_t fcIndex = m_spSubTaskStats->GetCurrentIndex();
94 94                 if(fcIndex >= fcCount)
95 95                         fcIndex = 0;
96 96
97 97                 TFileInfoPtr spFileInfo = rFilesCache.GetAt(fcIndex);
98 98                 m_spSubTaskStats->SetCurrentPath(spFileInfo->GetFullFilePath().ToString());
99 99         }
100 100
101 101         TSubTaskBase::ESubOperationResult TSubTaskCopyMove::Exec()
102 102         {
103 103                 TScopedRunningTimeTracker guard(*m_spSubTaskStats);
104 104                 FeedbackManagerPtr spFeedbackManager = GetContext().GetFeedbackManager();
105 105                 spFeedbackManager->SetSecondaryTimeTracker(&guard);
106 106
  107 #pragma warning(push)
  108 #pragma warning(disable: 4459)
107 109                 BOOST_SCOPE_EXIT(&spFeedbackManager) {
108 110                         spFeedbackManager->SetSecondaryTimeTracker(nullptr);
109 111                 } BOOST_SCOPE_EXIT_END
  112 #pragma warning(pop)
110 113
111 114                 TFileInfoArray& rFilesCache = GetContext().GetFilesCache();
112 115                 TTaskConfigTracker& rCfgTracker = GetContext().GetCfgTracker();
113 116                 TWorkerThreadController& rThreadController = GetContext().GetThreadController();
114 117                 const TConfig& rConfig = GetContext().GetConfig();
115 118                 TSmartPath pathDestination = GetContext().GetDestinationPath();
116 119                 IFilesystemPtr spFilesystem = GetContext().GetLocalFilesystem();
117 120                 TBasePathDataContainerPtr spSrcPaths = GetContext().GetBasePaths();
118 121
119 122                 TFilesystemFeedbackWrapper tFilesystemFBWrapper(spFeedbackManager, spFilesystem, GetContext().GetLogFileData(), rThreadController);
120 123
121 124                 // log
122 125                 LOG_INFO(m_spLog) << _T("Processing files/folders (ProcessFiles)");
123 126
124 127                 // initialize stats if not resuming (when resuming we have already initialized
125 128                 // the stats once - it is being restored in Load() too).
126 129                 if (!m_spSubTaskStats->IsInitialized())
127 130                         m_spSubTaskStats->Init(TBufferSizes::eBuffer_Default, rFilesCache.GetCount(), 0, rFilesCache.CalculateTotalSize(), rFilesCache.CalculatePartialSize(m_spSubTaskStats->GetCurrentIndex()), TString());
128 131                 else
129 132                 {