diff --git a/overlay_experimental/Base_Hook.cpp b/overlay_experimental/Base_Hook.cpp index 59d4762..d0da907 100644 --- a/overlay_experimental/Base_Hook.cpp +++ b/overlay_experimental/Base_Hook.cpp @@ -34,7 +34,7 @@ void Base_Hook::UnhookAll() } } -void Base_Hook::HookFuncs(std::pair hook) +void Base_Hook::HookFunc(std::pair hook) { if( DetourAttach(hook.first, hook.second) == 0 ) _hooked_funcs.emplace_back(hook); diff --git a/overlay_experimental/Base_Hook.h b/overlay_experimental/Base_Hook.h index 7fb9281..153bac6 100644 --- a/overlay_experimental/Base_Hook.h +++ b/overlay_experimental/Base_Hook.h @@ -29,13 +29,18 @@ public: void EndHook(); void UnhookAll(); - void HookFuncs(std::pair hook); + void HookFunc(std::pair hook); + + template + void HookFuncs(std::pair funcs) + { + HookFunc(funcs); + } template void HookFuncs(std::pair funcs, Args... args) { - _hooked_funcs.emplace_back(std::move(funcs)); - HookFuncs(funcs); + HookFunc(funcs); HookFuncs(args...); } };