diff options
| author | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-04-02 10:50:56 +0000 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-04-07 16:32:07 +0800 |
| commit | 8d5183ab0e49d9fbb11aa197ea033d96e1f7cf1f (patch) | |
| tree | 9c6940b69d36966c7ee1f367e214a73991f5277a /src | |
| parent | eff21ee2ce1fdb4328d71d801352ec25f4e457ff (diff) | |
style: clang-tidy
Diffstat (limited to 'src')
| -rw-r--r-- | src/scroller.cpp | 18 | ||||
| -rw-r--r-- | src/scroller.hpp | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/scroller.cpp b/src/scroller.cpp index bf80770..4dd8ec0 100644 --- a/src/scroller.cpp +++ b/src/scroller.cpp @@ -15,14 +15,14 @@ #include "ftxui/dom/requirement.hpp" // for Requirement #include "ftxui/screen/box.hpp" // for Box -namespace ftxui { +namespace ftxui { // NOLINT -class ScrollerBase : public ComponentBase { +class CScrollerBase : public ComponentBase { public: - ScrollerBase(Component child) { Add(child); } + CScrollerBase(Component child) { Add(child); } private: - Element OnRender() final { + Element OnRender() final { // NOLINT auto focused = Focused() ? focus : ftxui::select; auto style = Focused() ? inverted : nothing; @@ -39,7 +39,7 @@ class ScrollerBase : public ComponentBase { vscroll_indicator | yframe | yflex | reflect(box_); } - bool OnEvent(Event event) final { + bool OnEvent(Event event) final { // NOLINT if (event.is_mouse() && box_.Contain(event.mouse().x, event.mouse().y)) TakeFocus(); @@ -67,7 +67,7 @@ class ScrollerBase : public ComponentBase { return selected_old != selected_; } - bool Focusable() const final { return true; } + bool Focusable() const final { return true; } // NOLINT bool sticky_select = true; int selected_ = 0; @@ -75,10 +75,10 @@ class ScrollerBase : public ComponentBase { Box box_; }; -Component Scroller(Component child) { - return Make<ScrollerBase>(std::move(child)); +Component Scroller(Component child) { // NOLINT + return Make<CScrollerBase>(std::move(child)); } -} // namespace ftxui +} // namespace ftxui // NOLINT // Copyright 2021 Arthur Sonzogni. All rights reserved. // Use of this source code is governed by the MIT license that can be found in diff --git a/src/scroller.hpp b/src/scroller.hpp index 81a2a6d..57cccee 100644 --- a/src/scroller.hpp +++ b/src/scroller.hpp @@ -5,8 +5,8 @@ #include "ftxui/component/component_base.hpp" // for Component -namespace ftxui { -Component Scroller(Component child); +namespace ftxui { // NOLINT +Component Scroller(Component child); // NOLINT } #endif /* end of include guard: SCROLLER_H */ |
