Execute clang tidy and IWYU (#528)

This commit is contained in:
Arthur Sonzogni
2022-12-19 18:51:25 +01:00
committed by ArthurSonzogni
parent 4dc1a9fff9
commit 0542227ba7
55 changed files with 315 additions and 298 deletions

View File

@@ -1,6 +1,7 @@
#include <algorithm> // for max, min
#include <ftxui/component/component_options.hpp> // for SliderOption
#include <string> // for allocator
#include <utility> // for move
#include "ftxui/component/captured_mouse.hpp" // for CapturedMouse
#include "ftxui/component/component.hpp" // for Make, Slider
@@ -12,7 +13,7 @@
#include "ftxui/screen/box.hpp" // for Box
#include "ftxui/screen/color.hpp" // for Color, Color::GrayDark, Color::White
#include "ftxui/screen/util.hpp" // for clamp
#include "ftxui/util/ref.hpp" // for ConstRef, ConstStringRef, Ref
#include "ftxui/util/ref.hpp" // for ConstRef, Ref, ConstStringRef
namespace ftxui {
@@ -43,7 +44,7 @@ class SliderBase : public ComponentBase {
Element Render() override {
auto gauge_color = Focused() ? color(options_->color_active)
: color(options_->color_inactive);
float percent = float(value_() - min_()) / float(max_() - min_());
const float percent = float(value_() - min_()) / float(max_() - min_());
return gaugeDirection(percent, options_->direction) |
flexDirection(options_->direction) | reflect(gauge_box_) |
gauge_color;