Generate compile commands for clangd. (#855)

Fix all the diagnostics reported.

Bug: https://github.com/ArthurSonzogni/FTXUI/issues/828
This commit is contained in:
Arthur Sonzogni
2024-05-01 11:40:49 +02:00
committed by ArthurSonzogni
parent 6a755f3760
commit 8a2a9b0799
81 changed files with 161 additions and 209 deletions

View File

@@ -4,7 +4,8 @@
#ifndef FTXUI_DOM_DEPRECATED_HPP
#define FTXUI_DOM_DEPRECATED_HPP
#include "ftxui/dom/elements.hpp"
#include <ftxui/dom/node.hpp>
#include <string>
namespace ftxui {
Element text(std::wstring text);

View File

@@ -14,7 +14,6 @@
#include "ftxui/dom/node.hpp"
#include "ftxui/screen/box.hpp"
#include "ftxui/screen/color.hpp"
#include "ftxui/screen/screen.hpp"
#include "ftxui/screen/terminal.hpp"
#include "ftxui/util/ref.hpp"
@@ -80,9 +79,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

@@ -4,7 +4,6 @@
#ifndef FTXUI_DOM_TABLE
#define FTXUI_DOM_TABLE
#include <memory>
#include <string> // for string
#include <vector> // for vector
@@ -37,8 +36,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,7 +5,7 @@
#define FTXUI_DOM_TAKE_ANY_ARGS_HPP
// IWYU pragma: private, include "ftxui/dom/elements.hpp"
#include <type_traits>
#include <ftxui/dom/node.hpp>
namespace ftxui {
@@ -19,8 +19,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.