Generate compile commands for clangd.

Fix all the diagnostics reported.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/828
This commit is contained in:
ArthurSonzogni
2024-05-01 11:37:21 +02:00
parent 6a755f3760
commit 789a600f72
21 changed files with 98 additions and 65 deletions

View File

@@ -80,9 +80,7 @@ Decorator borderStyled(BorderStyle);
Decorator borderStyled(BorderStyle, Color);
Decorator borderStyled(Color);
Decorator borderWith(const Pixel&);
Element window(Element title,
Element content,
BorderStyle border = ROUNDED);
Element window(Element title, Element content, BorderStyle border = ROUNDED);
Element spinner(int charset_index, size_t image_index);
Element paragraph(const std::string& text);
Element paragraphAlignLeft(const std::string& text);

View File

@@ -22,7 +22,7 @@ using Elements = std::vector<Element>;
class Node {
public:
Node();
Node(Elements children);
explicit Node(Elements children);
Node(const Node&) = delete;
Node(const Node&&) = delete;
Node& operator=(const Node&) = delete;

View File

@@ -37,8 +37,8 @@ class TableSelection;
class Table {
public:
Table();
Table(std::vector<std::vector<std::string>>);
Table(std::vector<std::vector<Element>>);
explicit Table(std::vector<std::vector<std::string>>);
explicit Table(std::vector<std::vector<Element>>);
TableSelection SelectAll();
TableSelection SelectCell(int column, int row);
TableSelection SelectRow(int row_index);

View File

@@ -5,6 +5,7 @@
#define FTXUI_DOM_TAKE_ANY_ARGS_HPP
// IWYU pragma: private, include "ftxui/dom/elements.hpp"
#include <ftxui/dom/node.hpp>
#include <type_traits>
namespace ftxui {
@@ -19,8 +20,9 @@ inline void Merge(Elements& container, Element element) {
template <>
inline void Merge(Elements& container, Elements elements) {
for (auto& element : elements)
for (auto& element : elements) {
container.push_back(std::move(element));
}
}
// Turn a set of arguments into a vector.