diff options
| author | JosJuice <josjuice@gmail.com> | 2022-07-02 09:17:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 09:17:44 +0200 |
| commit | 07a15a3228cb141e98fdfb51c09786f10e77389b (patch) | |
| tree | 1467561764e1c4a7182aca75c6a164c1fcc7eeeb /Source/Core/VideoCommon/Statistics.cpp | |
| parent | b5f4b0dffe8a6e4d5660278ba4df11e6f8c7fda4 (diff) | |
| parent | 69e32dea5272e29ebdc2e056d45f570556c71633 (diff) | |
Merge pull request #10624 from Minty-Meeo/resolve-gcc-warnings
Resolve Linux GCC Warnings
Diffstat (limited to 'Source/Core/VideoCommon/Statistics.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Statistics.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index bd0bf0f54c..7b4a785c6f 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -336,12 +336,12 @@ void Statistics::DisplayScissor() // Visualization of where things are updated on screen with this specific scissor ImGui::TableNextColumn(); - float scale = ImGui::GetTextLineHeight() / EFB_HEIGHT; + float scale_height = ImGui::GetTextLineHeight() / EFB_HEIGHT; if (show_raw_scissors) - scale += ImGui::GetTextLineHeightWithSpacing() / EFB_HEIGHT; + scale_height += ImGui::GetTextLineHeightWithSpacing() / EFB_HEIGHT; ImVec2 p2 = ImGui::GetCursorScreenPos(); // Use a height of 1 since we want this to span two table rows (if possible) - ImGui::Dummy(ImVec2(EFB_WIDTH * scale, 1)); + ImGui::Dummy(ImVec2(EFB_WIDTH * scale_height, 1)); for (size_t i = 0; i < info.m_result.size(); i++) { // The last entry in the sorted list of results is the one that is used by hardware backends @@ -350,11 +350,12 @@ void Statistics::DisplayScissor() const ImU32 new_col = (col & ~IM_COL32_A_MASK) | (new_alpha << IM_COL32_A_SHIFT); const auto& r = info.m_result[i]; - draw_list->AddRectFilled(ImVec2(p2.x + r.rect.left * scale, p2.y + r.rect.top * scale), - ImVec2(p2.x + r.rect.right * scale, p2.y + r.rect.bottom * scale), - new_col); + draw_list->AddRectFilled( + ImVec2(p2.x + r.rect.left * scale_height, p2.y + r.rect.top * scale_height), + ImVec2(p2.x + r.rect.right * scale_height, p2.y + r.rect.bottom * scale_height), new_col); } - draw_list->AddRect(p2, ImVec2(p2.x + EFB_WIDTH * scale, p2.y + EFB_HEIGHT * scale), light_grey); + draw_list->AddRect( + p2, ImVec2(p2.x + EFB_WIDTH * scale_height, p2.y + EFB_HEIGHT * scale_height), light_grey); ImGui::SameLine(); ImGui::Text("%d", int(info.m_result.size())); @@ -428,7 +429,7 @@ void Statistics::DisplayScissor() draw_scissor_table_header(); for (size_t i = 0; i < scissors.size(); i++) draw_scissor_table_row(i); - for (size_t i = scissors.size(); i < scissor_expected_count; i++) + for (size_t i = scissors.size(); i < static_cast<size_t>(scissor_expected_count); i++) scissor_table_skip_row(i); ImGui::EndTable(); } @@ -440,7 +441,7 @@ void Statistics::DisplayScissor() draw_viewport_table_header(); for (size_t i = 0; i < scissors.size(); i++) draw_viewport_table_row(i); - for (size_t i = scissors.size(); i < scissor_expected_count; i++) + for (size_t i = scissors.size(); i < static_cast<size_t>(scissor_expected_count); i++) viewport_table_skip_row(i); ImGui::EndTable(); } |
