mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 08:28:09 +08:00
Generate compile commands for clangd. (#855)
Fix all the diagnostics reported. Bug: https://github.com/ArthurSonzogni/FTXUI/issues/828
This commit is contained in:

committed by
ArthurSonzogni

parent
6a755f3760
commit
8a2a9b0799
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace ftxui {
|
||||
namespace box_helper {
|
||||
namespace ftxui::box_helper {
|
||||
|
||||
struct Element {
|
||||
// Input:
|
||||
@@ -21,7 +20,6 @@ struct Element {
|
||||
|
||||
void Compute(std::vector<Element>* elements, int target_size);
|
||||
|
||||
} // namespace box_helper
|
||||
} // namespace ftxui
|
||||
} // namespace ftxui::box_helper
|
||||
|
||||
#endif /* end of include guard: FTXUI_DOM_BOX_HELPER_HPP */
|
||||
|
@@ -341,7 +341,7 @@ void Canvas::DrawPointEllipse(int x1,
|
||||
int dy = x * x;
|
||||
int err = dx + dy;
|
||||
|
||||
do {
|
||||
do { // NOLINT
|
||||
DrawPoint(x1 - x, y1 + y, true, s);
|
||||
DrawPoint(x1 + x, y1 + y, true, s);
|
||||
DrawPoint(x1 + x, y1 - y, true, s);
|
||||
@@ -405,7 +405,7 @@ void Canvas::DrawPointEllipseFilled(int x1,
|
||||
int dy = x * x;
|
||||
int err = dx + dy;
|
||||
|
||||
do {
|
||||
do { // NOLINT
|
||||
for (int xx = x1 + x; xx <= x1 - x; ++xx) {
|
||||
DrawPoint(xx, y1 + y, true, s);
|
||||
DrawPoint(xx, y1 - y, true, s);
|
||||
@@ -686,7 +686,7 @@ void Canvas::DrawBlockEllipse(int x1,
|
||||
int dy = x * x;
|
||||
int err = dx + dy;
|
||||
|
||||
do {
|
||||
do { // NOLINT
|
||||
DrawBlock(x1 - x, 2 * (y1 + y), true, s);
|
||||
DrawBlock(x1 + x, 2 * (y1 + y), true, s);
|
||||
DrawBlock(x1 + x, 2 * (y1 - y), true, s);
|
||||
@@ -752,7 +752,7 @@ void Canvas::DrawBlockEllipseFilled(int x1,
|
||||
int dy = x * x;
|
||||
int err = dx + dy;
|
||||
|
||||
do {
|
||||
do { // NOLINT
|
||||
for (int xx = x1 + x; xx <= x1 - x; ++xx) {
|
||||
DrawBlock(xx, 2 * (y1 + y), true, s);
|
||||
DrawBlock(xx, 2 * (y1 - y), true, s);
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <algorithm> // for max
|
||||
#include <memory> // for __shared_ptr_access, shared_ptr, make_shared
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Element, Elements, dbox
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
|
@@ -6,7 +6,6 @@
|
||||
#include <algorithm> // for max, min
|
||||
#include <cstddef> // for size_t
|
||||
#include <ftxui/dom/flexbox_config.hpp> // for FlexboxConfig, FlexboxConfig::Direction, FlexboxConfig::AlignContent, FlexboxConfig::JustifyContent, FlexboxConfig::Wrap, FlexboxConfig::Direction::RowInversed, FlexboxConfig::AlignItems, FlexboxConfig::Direction::Row, FlexboxConfig::Direction::Column, FlexboxConfig::Direction::ColumnInversed, FlexboxConfig::Wrap::WrapInversed, FlexboxConfig::AlignContent::Stretch, FlexboxConfig::JustifyContent::Stretch, FlexboxConfig::Wrap::Wrap, FlexboxConfig::AlignContent::Center, FlexboxConfig::AlignContent::FlexEnd, FlexboxConfig::AlignContent::FlexStart, FlexboxConfig::AlignContent::SpaceAround, FlexboxConfig::AlignContent::SpaceBetween, FlexboxConfig::AlignContent::SpaceEvenly, FlexboxConfig::AlignItems::Center, FlexboxConfig::AlignItems::FlexEnd, FlexboxConfig::AlignItems::FlexStart, FlexboxConfig::AlignItems::Stretch, FlexboxConfig::JustifyContent::Center, FlexboxConfig::JustifyContent::FlexEnd, FlexboxConfig::JustifyContent::FlexStart, FlexboxConfig::JustifyContent::SpaceAround, FlexboxConfig::JustifyContent::SpaceBetween, FlexboxConfig::JustifyContent::SpaceEvenly, FlexboxConfig::Wrap::NoWrap
|
||||
#include <memory> // for allocator_traits<>::value_type
|
||||
#include <utility> // for swap, move
|
||||
|
||||
#include "ftxui/dom/box_helper.hpp" // for Element, Compute
|
||||
|
@@ -7,8 +7,7 @@
|
||||
#include <vector>
|
||||
#include "ftxui/dom/flexbox_config.hpp"
|
||||
|
||||
namespace ftxui {
|
||||
namespace flexbox_helper {
|
||||
namespace ftxui::flexbox_helper {
|
||||
|
||||
struct Block {
|
||||
// Input:
|
||||
@@ -20,8 +19,8 @@ struct Block {
|
||||
int flex_shrink_y = 0;
|
||||
|
||||
// Output:
|
||||
int line;
|
||||
int line_position;
|
||||
int line{};
|
||||
int line_position{};
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int dim_x = 0;
|
||||
@@ -38,7 +37,6 @@ struct Global {
|
||||
|
||||
void Compute(Global& global);
|
||||
|
||||
} // namespace flexbox_helper
|
||||
} // namespace ftxui
|
||||
} // namespace ftxui::flexbox_helper
|
||||
|
||||
#endif /* end of include guard: FTXUI_DOM_FLEXBOX_HELPER_HPP*/
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h>
|
||||
#include <ftxui/dom/flexbox_config.hpp> // for FlexboxConfig, FlexboxConfig::Direction, FlexboxConfig::Direction::Column, FlexboxConfig::Direction::ColumnInversed, FlexboxConfig::Direction::Row, FlexboxConfig::Direction::RowInversed
|
||||
#include <memory> // for allocator_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/flexbox_helper.hpp"
|
||||
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <algorithm> // for max, min
|
||||
#include <memory> // for make_shared, __shared_ptr_access
|
||||
#include <utility> // for move
|
||||
#include <vector> // for __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Element, unpack, Elements, focus, frame, select, xframe, yframe
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory> // for allocator
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for gauge, gaugeUp
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
|
@@ -35,7 +35,7 @@ int Integrate(std::vector<int>& elements) {
|
||||
class GridBox : public Node {
|
||||
public:
|
||||
explicit GridBox(std::vector<Elements> lines) : lines_(std::move(lines)) {
|
||||
y_size = lines_.size();
|
||||
y_size = static_cast<int>(lines_.size());
|
||||
for (const auto& line : lines_) {
|
||||
x_size = std::max(x_size, int(line.size()));
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <algorithm> // for remove
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for allocator, basic_string, string
|
||||
#include <vector> // for vector
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h> // for Test, EXPECT_EQ, Message, TestPartResult, TestInfo (ptr only), TEST
|
||||
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient::Stop, LinearGradient
|
||||
#include <memory> // for allocator_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, bgcolor, color, Element
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
|
@@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <ftxui/dom/node.hpp> // for Node, Elements
|
||||
#include <memory> // for __shared_ptr_access
|
||||
#include <vector> // for __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/node_decorator.hpp"
|
||||
#include "ftxui/dom/requirement.hpp" // for Requirement
|
||||
|
@@ -15,7 +15,7 @@ struct Box;
|
||||
// Helper class.
|
||||
class NodeDecorator : public Node {
|
||||
public:
|
||||
NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
|
||||
explicit NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
|
||||
void ComputeRequirement() override;
|
||||
void SetBox(Box box) override;
|
||||
};
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// the LICENSE file.
|
||||
#include <memory> // for make_shared, __shared_ptr_access
|
||||
#include <utility> // for move
|
||||
#include <vector> // for __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Element, unpack, Decorator, reflect
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include <memory> // for make_shared, __shared_ptr_access
|
||||
#include <string> // for string
|
||||
#include <utility> // for move
|
||||
#include <vector> // for __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Element, vscroll_indicator, hscroll_indicator
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory> // for shared_ptr
|
||||
#include <string> // for allocator, to_string, string
|
||||
#include <utility> // for move
|
||||
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include <algorithm> // for min, max
|
||||
#include <memory> // for make_shared, __shared_ptr_access
|
||||
#include <utility> // for move
|
||||
#include <vector> // for __alloc_traits<>::value_type
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Constraint, WidthOrHeight, EQUAL, GREATER_THAN, LESS_THAN, WIDTH, unpack, Decorator, Element, size
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for allocator, allocator_traits<>::value_type
|
||||
#include <string> // for basic_string, string
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h>
|
||||
#include <string> // for allocator
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for spinner
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
|
@@ -73,7 +73,7 @@ Table::Table(std::vector<std::vector<Element>> input) {
|
||||
|
||||
// private
|
||||
void Table::Initialize(std::vector<std::vector<Element>> input) {
|
||||
input_dim_y_ = input.size();
|
||||
input_dim_y_ = static_cast<int>(input.size());
|
||||
input_dim_x_ = 0;
|
||||
for (auto& row : input) {
|
||||
input_dim_x_ = std::max(input_dim_x_, int(row.size()));
|
||||
|
@@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <gtest/gtest.h>
|
||||
#include <memory> // for allocator
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for LIGHT, flex, center, EMPTY, DOUBLE
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include <memory> // for make_shared
|
||||
#include <string> // for string, wstring
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "ftxui/dom/deprecated.hpp" // for text, vtext
|
||||
#include "ftxui/dom/elements.hpp" // for Element, text, vtext
|
||||
|
@@ -1,12 +1,10 @@
|
||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
||||
#include <algorithm> // for min
|
||||
#include <functional> // for function
|
||||
#include <memory> // for __shared_ptr_access, make_unique
|
||||
#include <type_traits> // for remove_reference, remove_reference<>::type
|
||||
#include <utility> // for move
|
||||
#include <vector> // for vector
|
||||
#include <algorithm> // for min
|
||||
#include <functional> // for function
|
||||
#include <memory> // for __shared_ptr_access, make_unique
|
||||
#include <utility> // for move
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for Element, Decorator, Elements, operator|, Fit, emptyElement, nothing, operator|=
|
||||
#include "ftxui/dom/node.hpp" // for Node, Node::Status
|
||||
|
Reference in New Issue
Block a user