File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ namespace detail {
3737 {
3838 }
3939
40- TItem item;
40+ std::optional< TItem> item;
4141 std::optional<TResult> result;
4242 wil::ResultException error{S_OK};
4343 bool hasError{false };
@@ -142,7 +142,7 @@ namespace detail {
142142
143143 if (worker->workerResult .hasError )
144144 {
145- onError (worker->workerResult .item , worker->workerResult .error );
145+ onError (* worker->workerResult .item , worker->workerResult .error );
146146 }
147147 else if (worker->workerResult .result .has_value ())
148148 {
@@ -180,7 +180,7 @@ namespace detail {
180180
181181 try
182182 {
183- worker.workerResult .result = worker.context ->onWork (worker.workerResult .item , worker.context ->cancelEvent .get ());
183+ worker.workerResult .result = worker.context ->onWork (* worker.workerResult .item , worker.context ->cancelEvent .get ());
184184 }
185185 catch (const wil::ResultException& ex)
186186 {
@@ -190,7 +190,7 @@ namespace detail {
190190 catch (...)
191191 {
192192 worker.workerResult .hasError = true ;
193- worker.workerResult .error = wil::ResultException{wil::details:: ResultFromCaughtException ()};
193+ worker.workerResult .error = wil::ResultException{wil::ResultFromCaughtException ()};
194194 }
195195
196196 worker.done .SetEvent ();
Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ void ShowContainerStats(CLIExecutionContext& context)
575575 // Work to be done for each container ID on a separate thread.
576576 // cancelHandle is signalled if the overall operation times out, check it before
577577 // the blocking Stats call so we exit cooperatively without waiting a full ~1s sample.
578- [session, userSpecifiedContainers](const std::wstring& containerId, HANDLE cancelHandle) {
578+ [session, userSpecifiedContainers](const std::wstring& containerId, HANDLE cancelHandle) mutable {
579579 if (::WaitForSingleObject (cancelHandle, 0 ) == WAIT_OBJECT_0)
580580 {
581581 THROW_HR (HRESULT_FROM_WIN32 (ERROR_CANCELLED));
You can’t perform that action at this time.
0 commit comments