From 997891b27d17377111f484c62ba41caf15475d72 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 30 Mar 2025 14:45:05 +0530 Subject: Fix issue with keymap/webview setup on init --- src/utils.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utils.hpp') diff --git a/src/utils.hpp b/src/utils.hpp index d5d4fc5..d7ca4c0 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,5 +1,7 @@ #pragma once +#include + #define DELEGATE(OBJ, METHOD, METHOD_AS) \ template decltype(auto) METHOD_AS(Args &&...args) { \ return OBJ->METHOD(std::forward(args)...); \ @@ -10,3 +12,6 @@ #define DEFINE_GETTER(METHOD, EXPR) \ decltype(auto) METHOD() { return EXPR; } + +#define DEFER(DEFERRED_BLOCK) \ + std::shared_ptr __deferred(nullptr, [](...) DEFERRED_BLOCK); -- cgit v1.3.1