Autogen: Refactor std::bind calls to lambdas

This commit is contained in:
Artur Ryt
2019-01-29 20:51:12 +01:00
parent d75fec5a88
commit d6fbd438c4
2 changed files with 2 additions and 6 deletions

View File

@@ -1111,8 +1111,7 @@ void cmQtAutoGeneratorMocUic::WorkerT::UVProcessStart(uv_async_t* handle)
{
std::lock_guard<std::mutex> lock(wrk.ProcessMutex_);
if (wrk.Process_ && !wrk.Process_->IsStarted()) {
wrk.Process_->start(handle->loop,
std::bind(&WorkerT::UVProcessFinished, &wrk));
wrk.Process_->start(handle->loop, [&wrk] { wrk.UVProcessFinished(); });
}
}
}

View File

@@ -10,8 +10,6 @@
#include "cmSystemTools.h"
#include "cmUVHandlePtr.h"
#include <functional>
// -- Class methods
cmQtAutoGeneratorRcc::cmQtAutoGeneratorRcc()
@@ -662,8 +660,7 @@ bool cmQtAutoGeneratorRcc::StartProcess(
Process_ = cm::make_unique<ReadOnlyProcessT>();
Process_->setup(&ProcessResult_, mergedOutput, command, workingDirectory);
// Start process
if (!Process_->start(UVLoop(),
std::bind(&cm::uv_async_ptr::send, &UVRequest()))) {
if (!Process_->start(UVLoop(), [this] { UVRequest().send(); })) {
Log().ErrorFile(GeneratorT::RCC, QrcFile_, ProcessResult_.ErrorMessage);
Error_ = true;
// Clean up