Merge pull request #10377 from Pokechu22/warning-fixes-jan-2022

Fix several compile warnings on GCC
This commit is contained in:
JosJuice
2022-02-18 21:05:42 +01:00
committed by GitHub
12 changed files with 56 additions and 30 deletions

View File

@ -376,7 +376,7 @@ void CodeViewWidget::Update()
void CodeViewWidget::CalculateBranchIndentation()
{
const size_t rows = rowCount();
const u32 rows = rowCount();
const size_t columns = m_branches.size();
if (rows < 1 || columns < 1)
return;
@ -442,7 +442,7 @@ void CodeViewWidget::CalculateBranchIndentation()
};
const u32 first_visible_addr = AddressForRow(0);
const u32 last_visible_addr = AddressForRow(static_cast<int>(rows - 1));
const u32 last_visible_addr = AddressForRow(rows - 1);
if (first_visible_addr <= last_visible_addr)
{
@ -456,7 +456,7 @@ void CodeViewWidget::CalculateBranchIndentation()
// first_visible_addr to fffffffc, and the second for 00000000 to last_visible_addr.
// That means we need to find the row corresponding to 00000000.
int addr_zero_row = -1;
for (int row = 0; row < rows; row++)
for (u32 row = 0; row < rows; row++)
{
if (AddressForRow(row) == 0)
{

View File

@ -704,6 +704,8 @@ public:
case VertexComponentFormat::Direct:
process_simple_component(component_sizes[vtx_attr.GetColorFormat(c)]);
break;
case VertexComponentFormat::NotPresent:
break;
}
}
for (u32 t = 0; t < vtx_desc.high.TexCoord.Size(); t++)

View File

@ -207,10 +207,10 @@ void RiivolutionBootWidget::MakeGUIForParsedFile(std::string path, std::string r
connect(selection, qOverload<int>(&QComboBox::currentIndexChanged), this,
[this, selection](int idx) {
const auto gui_index = selection->currentData().value<GuiRiivolutionPatchIndex>();
auto& disc = m_discs[gui_index.m_disc_index].disc;
auto& section = disc.m_sections[gui_index.m_section_index];
auto& option = section.m_options[gui_index.m_option_index];
option.m_selected_choice = static_cast<u32>(gui_index.m_choice_index);
auto& selected_disc = m_discs[gui_index.m_disc_index].disc;
auto& selected_section = selected_disc.m_sections[gui_index.m_section_index];
auto& selected_option = selected_section.m_options[gui_index.m_option_index];
selected_option.m_selected_choice = static_cast<u32>(gui_index.m_choice_index);
});
grid_layout->addWidget(label, row, 0, 1, 1);