all repos — fluxbox @ 52c374570ee5791a0b953f4ffc75082f216d1d1e

custom fork of the fluxbox windowmanager

minor code simplifications
Mathias Gumz akira at fluxbox dot org
commit

52c374570ee5791a0b953f4ffc75082f216d1d1e

parent

0810d7db5e87d9541daabac98a4b8b2d0f431b69

2 files changed, 7 insertions(+), 18 deletions(-)

jump to
M src/ToolFactory.ccsrc/ToolFactory.cc

@@ -139,18 +139,13 @@ }

int ToolFactory::maxFontHeight() { + unsigned int max_height = 0; - if (max_height < m_clock_theme.font().height()) - max_height = m_clock_theme.font().height(); - if (max_height < m_focused_iconbar_theme.text().font().height()) - max_height = m_focused_iconbar_theme.text().font().height(); - - if (max_height < m_unfocused_iconbar_theme.text().font().height()) - max_height = m_unfocused_iconbar_theme.text().font().height(); - - if (max_height < m_workspace_theme->font().height()) - max_height = m_workspace_theme->font().height(); + max_height = std::max(max_height, m_clock_theme.font().height()); + max_height = std::max(max_height, m_focused_iconbar_theme.text().font().height()); + max_height = std::max(max_height, m_unfocused_iconbar_theme.text().font().height()); + max_height = std::max(max_height, m_workspace_theme->font().height()); return max_height; }
M src/Toolbar.ccsrc/Toolbar.cc

@@ -953,10 +953,7 @@ // the bevel and border are fixed whether relative or not

fixed_width += bevel_width + 2*borderW; } else { if (!first) { - if (borderW > last_bw) - fixed_width += borderW; - else - fixed_width += last_bw; + fixed_width += std::max(borderW, last_bw); } else { first = false; }

@@ -1013,10 +1010,7 @@

if (bevel_width == 0) { offset = -borderW; size_offset = 0; - if (borderW > last_bw) - next_x += borderW; - else - next_x += last_bw; + next_x += std::max(borderW, last_bw); } last_bw = borderW;