Refactoring + update some stuff

This commit is contained in:
Federico Cecchetto
2021-06-19 03:40:28 +02:00
parent 833271b7a1
commit 50eb58dfd9
8 changed files with 52 additions and 53 deletions

View File

@ -71,6 +71,19 @@ namespace scripting
}
}
std::string find_token(unsigned int id)
{
for (const auto& token : token_map)
{
if (token.second == id)
{
return token.first;
}
}
return {};
}
int find_token_id(const std::string& name)
{
const auto result = token_map.find(name);