From 3f40e5abc43fe6a7751e1c5a850492fc3e359c44 Mon Sep 17 00:00:00 2001 From: Jan Buenker Date: Wed, 8 May 2024 17:42:16 +0200 Subject: [PATCH] Fix compilation for djinni::Future --- support-lib/cpp/Future.hpp | 3 ++- support-lib/objc/Future_objc.hpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/support-lib/cpp/Future.hpp b/support-lib/cpp/Future.hpp index fc2adffb..dede703d 100644 --- a/support-lib/cpp/Future.hpp +++ b/support-lib/cpp/Future.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef __cpp_coroutines #if __has_include() @@ -414,7 +415,7 @@ Future combine(U&& futures, size_t c) { return future; } for (auto& f: futures) { - f.then([context] (auto f) { + f.then([context] (auto) { if (--(context->counter) == 0) { context->promise.setValue(); } diff --git a/support-lib/objc/Future_objc.hpp b/support-lib/objc/Future_objc.hpp index 339b9780..0249156b 100644 --- a/support-lib/objc/Future_objc.hpp +++ b/support-lib/objc/Future_objc.hpp @@ -82,7 +82,7 @@ class FutureAdaptor __block auto p = std::make_unique(); auto f = p->getFuture(); - [o then: ^id(DJFuture* res) { + [o then: ^id(DJFuture*) { @try { p->setValue(); } @catch (NSException* e) { @@ -98,7 +98,7 @@ class FutureAdaptor DJPromise* promise = [[DJPromise alloc] init]; DJFuture* future = [promise getFuture]; - c.then([promise] (Future res) { + c.then([promise] (Future) { try { [promise setValue:[NSNull null]]; } catch (const std::exception& e) {