mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
string_view refactor
This commit is contained in:
@@ -19,9 +19,9 @@ struct STRG : ISTRG
|
||||
std::unordered_map<DNAFourCC, std::vector<std::string>*> langMap;
|
||||
std::map<std::string, int32_t> names;
|
||||
|
||||
int32_t lookupIdx(const std::string& name) const
|
||||
int32_t lookupIdx(std::string_view name) const
|
||||
{
|
||||
auto search = names.find(name);
|
||||
auto search = names.find(name.data());
|
||||
if (search == names.end())
|
||||
return -1;
|
||||
return search->second;
|
||||
|
||||
Reference in New Issue
Block a user