mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
Move variables to inner scope
This commit is contained in:
parent
18979129f3
commit
1ecd6fbc9b
2 changed files with 6 additions and 8 deletions
|
@ -543,8 +543,8 @@ void CodeWidget::StepOut()
|
||||||
clock::time_point timeout = clock::now() + std::chrono::seconds(5);
|
clock::time_point timeout = clock::now() + std::chrono::seconds(5);
|
||||||
|
|
||||||
auto& power_pc = m_system.GetPowerPC();
|
auto& power_pc = m_system.GetPowerPC();
|
||||||
auto& ppc_state = power_pc.GetPPCState();
|
|
||||||
{
|
{
|
||||||
|
auto& ppc_state = power_pc.GetPPCState();
|
||||||
Core::CPUThreadGuard guard(m_system);
|
Core::CPUThreadGuard guard(m_system);
|
||||||
|
|
||||||
PowerPC::CoreMode old_mode = power_pc.GetMode();
|
PowerPC::CoreMode old_mode = power_pc.GetMode();
|
||||||
|
|
|
@ -187,12 +187,11 @@ void GameList::MakeListView()
|
||||||
|
|
||||||
if (!Settings::GetQSettings().contains(QStringLiteral("tableheader/state")))
|
if (!Settings::GetQSettings().contains(QStringLiteral("tableheader/state")))
|
||||||
m_list->sortByColumn(static_cast<int>(GameListModel::Column::Title), Qt::AscendingOrder);
|
m_list->sortByColumn(static_cast<int>(GameListModel::Column::Title), Qt::AscendingOrder);
|
||||||
|
{
|
||||||
const auto SetResizeMode = [&hor_header](const GameListModel::Column column,
|
const auto SetResizeMode = [&hor_header](const GameListModel::Column column,
|
||||||
const QHeaderView::ResizeMode mode) {
|
const QHeaderView::ResizeMode mode) {
|
||||||
hor_header->setSectionResizeMode(static_cast<int>(column), mode);
|
hor_header->setSectionResizeMode(static_cast<int>(column), mode);
|
||||||
};
|
};
|
||||||
{
|
|
||||||
using Column = GameListModel::Column;
|
using Column = GameListModel::Column;
|
||||||
using Mode = QHeaderView::ResizeMode;
|
using Mode = QHeaderView::ResizeMode;
|
||||||
SetResizeMode(Column::Platform, Mode::Fixed);
|
SetResizeMode(Column::Platform, Mode::Fixed);
|
||||||
|
@ -1024,8 +1023,6 @@ void GameList::OnSectionResized(int index, int, int)
|
||||||
{
|
{
|
||||||
auto* hor_header = m_list->horizontalHeader();
|
auto* hor_header = m_list->horizontalHeader();
|
||||||
|
|
||||||
std::vector<int> sections;
|
|
||||||
|
|
||||||
const int vis_index = hor_header->visualIndex(index);
|
const int vis_index = hor_header->visualIndex(index);
|
||||||
const int col_count = hor_header->count() - hor_header->hiddenSectionCount();
|
const int col_count = hor_header->count() - hor_header->hiddenSectionCount();
|
||||||
|
|
||||||
|
@ -1043,6 +1040,7 @@ void GameList::OnSectionResized(int index, int, int)
|
||||||
|
|
||||||
if (!last)
|
if (!last)
|
||||||
{
|
{
|
||||||
|
std::vector<int> sections;
|
||||||
for (int i = 0; i < vis_index; i++)
|
for (int i = 0; i < vis_index; i++)
|
||||||
{
|
{
|
||||||
const int logical_index = hor_header->logicalIndex(i);
|
const int logical_index = hor_header->logicalIndex(i);
|
||||||
|
|
Loading…
Add table
Reference in a new issue