mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 07:39:17 +00:00
Expression: Support Case-Insensitive Register Names
This commit is contained in:
parent
d43c6dc555
commit
6aa59496aa
1 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@ using std::isnan;
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
#include "Common/StringUtil.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/Debugger/Debugger_SymbolMap.h"
|
#include "Core/Debugger/Debugger_SymbolMap.h"
|
||||||
#include "Core/PowerPC/MMU.h"
|
#include "Core/PowerPC/MMU.h"
|
||||||
|
@ -393,8 +394,9 @@ Expression::Expression(std::string_view text, ExprPointer ex, ExprVarListPointer
|
||||||
"Expression: Sorted lookup should not contain duplicate keys.");
|
"Expression: Sorted lookup should not contain duplicate keys.");
|
||||||
for (auto* v = m_vars->head; v != nullptr; v = v->next)
|
for (auto* v = m_vars->head; v != nullptr; v = v->next)
|
||||||
{
|
{
|
||||||
const auto iter = std::ranges::lower_bound(sorted_lookup, v->name, {}, &LookupKV::first);
|
const auto iter = std::ranges::lower_bound(sorted_lookup, v->name,
|
||||||
if (iter != sorted_lookup.end() && iter->first == v->name)
|
Common::CaseInsensitiveLess{}, &LookupKV::first);
|
||||||
|
if (iter != sorted_lookup.end() && Common::CaseInsensitiveEquals(iter->first, v->name))
|
||||||
m_binds.emplace_back(iter->second);
|
m_binds.emplace_back(iter->second);
|
||||||
else
|
else
|
||||||
m_binds.emplace_back();
|
m_binds.emplace_back();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue