Bazaar/Uniq : fixed lambda parameter passed by std::move

git-svn-id: svn://ultimatepp.org/upp/trunk@12209 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
micio 2018-08-31 13:16:40 +00:00
parent 12bb53705e
commit da79fe75b4
2 changed files with 4 additions and 2 deletions

View file

@ -8,8 +8,10 @@ NAMESPACE_UPP
bool Uniq::SendCmdLine(int pipe)
{
char buf[256];
Vector<String>v;
v.Clear();
fd_set rfds;
struct timeval tv;
FD_ZERO(&rfds);
@ -40,7 +42,7 @@ bool Uniq::SendCmdLine(int pipe)
}
fclose(f);
// posts the callback to handle new instance's command line
PostCallback([=, &v]() { WhenInstance(v); } );
PostCallback([=, v{pick(v)}]() { WhenInstance(v); } );
return true;
}

View file

@ -106,7 +106,7 @@ bool Uniq::SendCmdLine(void)
// disconnects from client
DisconnectNamedPipe(pipe);
PostCallback([=, &v]() { WhenInstance(v); } );
PostCallback([=, v{pick(v)}]() { WhenInstance(v); } );
return true;
}