diff --git a/toolbox/mm.cpp b/toolbox/mm.cpp index ad94556..2d47716 100644 --- a/toolbox/mm.cpp +++ b/toolbox/mm.cpp @@ -100,6 +100,14 @@ namespace return true; } + + template + int16_t with_handle(uint32_t handle, Fx fx) + { + auto iter = HandleMap.find(handle); + if (iter == HandleMap.end()) return MacOS::memWZErr; + return fx(iter->second); + } } namespace MM