diff --git a/bazaar/Uniq/Posix.cpp b/bazaar/Uniq/Posix.cpp index 95d1e17af..1cc588c55 100644 --- a/bazaar/Uniq/Posix.cpp +++ b/bazaar/Uniq/Posix.cpp @@ -40,7 +40,7 @@ bool Uniq::SendCmdLine(int pipe) } fclose(f); // posts the callback to handle new instance's command line - PostCallback(callback1(WhenInstance, v)); + PostCallback([=, &v]() { WhenInstance(v); } ); return true; } diff --git a/bazaar/Uniq/Uniq.h b/bazaar/Uniq/Uniq.h index 112d97d23..9770e2259 100644 --- a/bazaar/Uniq/Uniq.h +++ b/bazaar/Uniq/Uniq.h @@ -54,7 +54,7 @@ class Uniq typedef Uniq CLASSNAME; // callback called when another app instance is run - Callback1 const &> WhenInstance; + Event&> WhenInstance; Uniq(); diff --git a/bazaar/Uniq/Windows.cpp b/bazaar/Uniq/Windows.cpp index 8c6cc4298..20fbb8e89 100644 --- a/bazaar/Uniq/Windows.cpp +++ b/bazaar/Uniq/Windows.cpp @@ -106,7 +106,7 @@ bool Uniq::SendCmdLine(void) // disconnects from client DisconnectNamedPipe(pipe); - PostCallback(callback1(WhenInstance, v)); + PostCallback([=, &v]() { WhenInstance(v); } ); return true; }