Use IWYU.

This commit is contained in:
ArthurSonzogni
2021-05-01 20:40:35 +02:00
parent eb399d20c5
commit 155758c073
119 changed files with 770 additions and 342 deletions

View File

@@ -1,7 +1,4 @@
#include "ftxui/screen/color.hpp"
#include <algorithm>
#include "ftxui/screen/color_info.hpp"
#include "ftxui/screen/string.hpp"
#include "ftxui/screen/terminal.hpp"

View File

@@ -1,4 +1,5 @@
#include "ftxui/screen/color_info.hpp"
#include "ftxui/screen/color.hpp" // for Color, Color::Palette16, Color::Palette256
namespace ftxui {

View File

@@ -1,12 +1,12 @@
#include <algorithm> // for min
#include <iostream> // for operator<<, basic_ostream, wstringstream, stringstream, flush, cout, ostream
#include <sstream> // IWYU pragma: keep
#include "ftxui/dom/node.hpp" // for Element, Node
#include "ftxui/dom/requirement.hpp" // for Requirement
#include "ftxui/screen/screen.hpp"
#include <algorithm>
#include <sstream>
#include <iostream>
#include "ftxui/dom/node.hpp"
#include "ftxui/screen/string.hpp"
#include "ftxui/screen/terminal.hpp"
#include "ftxui/screen/string.hpp" // for to_string, wchar_width
#include "ftxui/screen/terminal.hpp" // for Terminal::Dimensions, Terminal
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
@@ -169,9 +169,9 @@ std::string Screen::ToString() {
auto width = wchar_width(c);
if (width <= 0) {
// Avoid an infinite loop for non-printable characters
c = L' ';
width = 1;
// Avoid an infinite loop for non-printable characters
c = L' ';
width = 1;
}
ss << c;
x += width;

View File

@@ -1,20 +1,17 @@
#include <cstdlib> // for getenv
#include <string> // for string, allocator
#include "ftxui/screen/terminal.hpp"
#include <stdio.h>
#include <cstdlib>
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <Windows.h>
#else
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/ioctl.h> // for winsize, ioctl, TIOCGWINSZ
#include <unistd.h> // for STDOUT_FILENO
#endif
#include <iostream>
namespace ftxui {
Terminal::Dimensions Terminal::Size() {

View File

@@ -59,7 +59,7 @@
* Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
*/
#include <wchar.h>
#include <string>
#include "ftxui/screen/string.hpp"