mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
citra-qt: static-constify a map.
This commit is contained in:
parent
2b0d7a1d29
commit
8cd0d9c000
1 changed files with 7 additions and 6 deletions
|
@ -39,15 +39,16 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
std::map<Pica::DebugContext::Event, QString> map;
|
static const std::map<Pica::DebugContext::Event, QString> map = {
|
||||||
map.insert({Pica::DebugContext::Event::CommandLoaded, tr("Pica command loaded")});
|
{ Pica::DebugContext::Event::CommandLoaded, tr("Pica command loaded") },
|
||||||
map.insert({Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed")});
|
{ Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed") },
|
||||||
map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")});
|
{ Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") },
|
||||||
map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")});
|
{ Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") },
|
||||||
|
};
|
||||||
|
|
||||||
_dbg_assert_(Debug_GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
|
_dbg_assert_(Debug_GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
|
||||||
|
|
||||||
return map[event];
|
return (map.find(event) != map.end()) ? map.at(event) : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
|
Loading…
Reference in a new issue