Prefix all getters with "get"
This commit is contained in:
@@ -46,7 +46,7 @@ namespace
|
||||
header = QStringLiteral("[WON] ") + header;
|
||||
}
|
||||
header += QStringLiteral(" - threat %1").arg(QString::number(team.threatLevel, 'f', 0));
|
||||
header += QStringLiteral(" - EHP %1").arg(QString::fromStdString(team.ehpPercentText()));
|
||||
header += QStringLiteral(" - EHP %1").arg(QString::fromStdString(team.getEhpPercentText()));
|
||||
return escapeCell(header);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void BalancingWindow::populateArenas(const BalancingConfig& balancingConfig)
|
||||
entry.widget = new ArenaWidget(index, arenaConfig.name, scrollContent);
|
||||
contentLayout->addWidget(entry.widget);
|
||||
|
||||
entry.widget->updateStatus(entry.simulation->status());
|
||||
entry.widget->updateStatus(entry.simulation->getStatus());
|
||||
|
||||
m_arenas.push_back(std::move(entry));
|
||||
}
|
||||
@@ -179,14 +179,14 @@ void BalancingWindow::pollStatuses()
|
||||
{
|
||||
if (entry.worker.joinable())
|
||||
{
|
||||
const ArenaStatus status = entry.simulation->status();
|
||||
const ArenaStatus status = entry.simulation->getStatus();
|
||||
entry.widget->updateStatus(status);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_inspectedSim && m_inspectedArenaIndex >= 0)
|
||||
{
|
||||
const ArenaStatus status = m_inspectedSim->status();
|
||||
const ArenaStatus status = m_inspectedSim->getStatus();
|
||||
m_arenas[static_cast<std::size_t>(m_inspectedArenaIndex)].widget->updateStatus(status);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void BalancingWindow::startArena(int index)
|
||||
entry.simulation = std::make_unique<ArenaSimulation>(
|
||||
m_gameConfig, entry.config, m_nextSeed++);
|
||||
entry.widget->startSimulation();
|
||||
entry.widget->updateStatus(entry.simulation->status());
|
||||
entry.widget->updateStatus(entry.simulation->getStatus());
|
||||
ArenaSimulation* sim = entry.simulation.get();
|
||||
entry.worker = std::thread([sim]() { sim->run(); });
|
||||
updateButtons();
|
||||
@@ -278,7 +278,7 @@ void BalancingWindow::inspectArena(int index)
|
||||
|
||||
entry.widget->resetToGrey();
|
||||
entry.widget->startSimulation();
|
||||
entry.widget->updateStatus(m_inspectedSim->status());
|
||||
entry.widget->updateStatus(m_inspectedSim->getStatus());
|
||||
|
||||
m_inspectWindow = new InspectWindow(
|
||||
m_inspectedSim.get(), &m_gameConfig, &m_visuals, entry.config.name, nullptr);
|
||||
@@ -336,7 +336,7 @@ void BalancingWindow::updateButtons()
|
||||
bool allRunning = true;
|
||||
for (ArenaEntry& entry : m_arenas)
|
||||
{
|
||||
if (entry.worker.joinable() && !entry.simulation->status().finished)
|
||||
if (entry.worker.joinable() && !entry.simulation->getStatus().finished)
|
||||
{
|
||||
anyRunning = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user