Profiler: Minor static code analysis issues in FlameGraphView
This commit is contained in:
parent
16f0248ca2
commit
4de0f68486
Notes:
sideshowbarker
2024-07-18 04:55:58 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/4de0f68486d Pull-request: https://github.com/SerenityOS/serenity/pull/9720
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ Vector<Gfx::Color> s_colors;
|
|||
|
||||
static Vector<Gfx::Color> const& get_colors()
|
||||
{
|
||||
if (s_colors.size() == 0) {
|
||||
if (s_colors.is_empty()) {
|
||||
// Start with a nice orange, then make shades of it
|
||||
Gfx::Color midpoint(255, 94, 19);
|
||||
s_colors.extend(midpoint.shades(3, 0.5f));
|
||||
|
@ -115,7 +115,7 @@ void FlameGraphView::paint_event(GUI::PaintEvent& event)
|
|||
GUI::Painter painter(*this);
|
||||
painter.add_clip_rect(event.rect());
|
||||
|
||||
for (auto& bar : m_bars) {
|
||||
for (const auto& bar : m_bars) {
|
||||
auto label_index = bar.index.sibling_at_column(m_text_column);
|
||||
String label = "All";
|
||||
if (label_index.is_valid()) {
|
||||
|
@ -152,7 +152,7 @@ void FlameGraphView::layout_bars()
|
|||
{
|
||||
m_bars.clear();
|
||||
|
||||
// Explicit copy here so the layout can multate
|
||||
// Explicit copy here so the layout can mutate
|
||||
Vector<GUI::ModelIndex> selected = m_selected_indexes;
|
||||
GUI::ModelIndex null_index;
|
||||
layout_children(null_index, 0, 0, this->width(), selected);
|
||||
|
|
Loading…
Add table
Reference in a new issue