Fix warning about implicit std::pair copy in android hook code

This commit is contained in:
baldurk
2021-03-23 12:50:26 +00:00
parent 0c83ff6a78
commit 911d290948
+4 -4
View File
@@ -791,13 +791,13 @@ void LibraryHooks::EndHookRegistration()
// call the callbacks for any libraries that loaded now. If the library wasn't loaded above then
// it can't be loaded, since we only hook system libraries.
std::map<rdcstr, rdcarray<FunctionLoadCallback>> callbacks = GetHookInfo().GetHookCallbacks();
for(const std::pair<rdcstr, rdcarray<FunctionLoadCallback>> &cb : callbacks)
for(auto it = callbacks.begin(); it != callbacks.end(); ++it)
{
void *handle = dlopen(cb.first.c_str(), RTLD_GLOBAL);
void *handle = dlopen(it->first.c_str(), RTLD_GLOBAL);
if(handle)
{
HOOK_DEBUG_PRINT("Calling callbacks for %s", cb.first.c_str());
for(FunctionLoadCallback callback : cb.second)
HOOK_DEBUG_PRINT("Calling callbacks for %s", it->first.c_str());
for(FunctionLoadCallback callback : it->second)
if(callback)
callback(handle);
}