From 1ad222a4b860efad5e439d067835414b42ea3a97 Mon Sep 17 00:00:00 2001 From: goaaats Date: Fri, 17 Jun 2022 19:05:47 +0200 Subject: [PATCH] chore: annotate __try workaround --- Dalamud.Boot/xivfixes.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dalamud.Boot/xivfixes.cpp b/Dalamud.Boot/xivfixes.cpp index e807f76ca..690bbe9a3 100644 --- a/Dalamud.Boot/xivfixes.cpp +++ b/Dalamud.Boot/xivfixes.cpp @@ -143,7 +143,8 @@ void xivfixes::unhook_dll(bool bApply) { } }; - const auto aaaa = [&]() { + // This is needed since try and __try cannot be used in the same function. Lambdas circumvent the limitation. + const auto windows_exception_handler = [&]() { for (size_t i = 0; i < mods.size(); i++) { const auto& mod = mods[i]; __try { @@ -154,7 +155,7 @@ void xivfixes::unhook_dll(bool bApply) { } }; - aaaa(); + windows_exception_handler(); } using TFnGetInputDeviceManager = void* ();