1
1
forked from 0ad/0ad

Uses correct value_type to iterate over the map in JSInterface_Hotkey. Refs a4852c4c01.

Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4633
This was SVN commit r26847.
This commit is contained in:
Vladislav Belov 2022-05-02 10:03:34 +00:00
parent a2df854547
commit a8caed8348

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2022 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -46,7 +46,7 @@ static void ToJSVal_unordered_map(const ScriptRequest& rq, JS::MutableHandleValu
ret.setUndefined();
return;
}
for (const std::pair<T, U>& item : val)
for (const std::pair<const T, U>& item : val)
{
JS::RootedValue el(rq.cx);
Script::ToJSVal<U>(rq, &el, item.second);