chore: annotate __try workaround

This commit is contained in:
goaaats 2022-06-17 19:05:47 +02:00
parent 740d7240b2
commit 1ad222a4b8
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B

View file

@ -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++) { for (size_t i = 0; i < mods.size(); i++) {
const auto& mod = mods[i]; const auto& mod = mods[i];
__try { __try {
@ -154,7 +155,7 @@ void xivfixes::unhook_dll(bool bApply) {
} }
}; };
aaaa(); windows_exception_handler();
} }
using TFnGetInputDeviceManager = void* (); using TFnGetInputDeviceManager = void* ();