mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Profiler: Minor static code analysis issues in FlameGraphView
This commit is contained in:
parent
16f0248ca2
commit
4de0f68486
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()
|
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
|
// Start with a nice orange, then make shades of it
|
||||||
Gfx::Color midpoint(255, 94, 19);
|
Gfx::Color midpoint(255, 94, 19);
|
||||||
s_colors.extend(midpoint.shades(3, 0.5f));
|
s_colors.extend(midpoint.shades(3, 0.5f));
|
||||||
|
@ -115,7 +115,7 @@ void FlameGraphView::paint_event(GUI::PaintEvent& event)
|
||||||
GUI::Painter painter(*this);
|
GUI::Painter painter(*this);
|
||||||
painter.add_clip_rect(event.rect());
|
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);
|
auto label_index = bar.index.sibling_at_column(m_text_column);
|
||||||
String label = "All";
|
String label = "All";
|
||||||
if (label_index.is_valid()) {
|
if (label_index.is_valid()) {
|
||||||
|
@ -152,7 +152,7 @@ void FlameGraphView::layout_bars()
|
||||||
{
|
{
|
||||||
m_bars.clear();
|
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;
|
Vector<GUI::ModelIndex> selected = m_selected_indexes;
|
||||||
GUI::ModelIndex null_index;
|
GUI::ModelIndex null_index;
|
||||||
layout_children(null_index, 0, 0, this->width(), selected);
|
layout_children(null_index, 0, 0, this->width(), selected);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue