mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 11:43:56 +00:00
Make Atom case-insensitive
This commit is contained in:
@@ -657,7 +657,7 @@ std::optional<uint16_t> process_context::find_atom(const std::u16string_view nam
|
||||
{
|
||||
for (auto& entry : this->atoms)
|
||||
{
|
||||
if (entry.second.name == name)
|
||||
if (utils::string::equals_ignore_case(std::u16string_view{entry.second.name}, name))
|
||||
{
|
||||
++entry.second.ref_count;
|
||||
return entry.first;
|
||||
@@ -680,7 +680,7 @@ uint16_t process_context::add_or_find_atom(std::u16string name)
|
||||
std::optional<uint16_t> last_entry{};
|
||||
for (auto& entry : this->atoms)
|
||||
{
|
||||
if (entry.second.name == name)
|
||||
if (utils::string::equals_ignore_case(entry.second.name, name))
|
||||
{
|
||||
++entry.second.ref_count;
|
||||
return entry.first;
|
||||
@@ -714,7 +714,7 @@ bool process_context::delete_atom(const std::u16string& name)
|
||||
{
|
||||
for (auto it = atoms.begin(); it != atoms.end(); ++it)
|
||||
{
|
||||
if (it->second.name == name)
|
||||
if (utils::string::equals_ignore_case(it->second.name, name))
|
||||
{
|
||||
if (--it->second.ref_count == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user