Execute IWYU (#299)

This commit is contained in:
Arthur Sonzogni
2022-01-07 11:03:54 +01:00
committed by GitHub
parent 358f886fab
commit cdd6339849
46 changed files with 242 additions and 248 deletions

View File

@@ -288,7 +288,9 @@ std::vector<std::string> Utf8ToGlyphs(const std::string& input) {
return out;
}
int GlyphPosition(const std::string& input, size_t glyph_to_skip, size_t start) {
int GlyphPosition(const std::string& input,
size_t glyph_to_skip,
size_t start) {
if (glyph_to_skip <= 0)
return 0;
size_t end = 0;

View File

@@ -59,7 +59,6 @@ TEST(StringTest, GlyphCount) {
EXPECT_EQ(GlyphCount("a\1a"), 2);
}
TEST(StringTest, GlyphPosition) {
// Basic:
EXPECT_EQ(GlyphPosition("", -1), 0);

View File

@@ -23,7 +23,7 @@ namespace ftxui {
// https://arthursonzogni.com/FTXUI/examples
// This will have to be improved when someone has time to implement and need
// it.
static Dimensions fallback_size {140, 43};
static Dimensions fallback_size{140, 43};
Dimensions Terminal::Size() {
return fallback_size;
}
@@ -33,7 +33,7 @@ Dimensions Terminal::Size() {
// The terminal size in VT100 was 80x24. It is still used nowadays by
// default in many terminal emulator. That's a good choice for a fallback
// value.
static Dimensions fallback_size {80, 24};
static Dimensions fallback_size{80, 24};
Dimensions Terminal::Size() {
CONSOLE_SCREEN_BUFFER_INFO csbi;
@@ -49,7 +49,7 @@ Dimensions Terminal::Size() {
// The terminal size in VT100 was 80x24. It is still used nowadays by
// default in many terminal emulator. That's a good choice for a fallback
// value.
static Dimensions fallback_size {80, 24};
static Dimensions fallback_size{80, 24};
Dimensions Terminal::Size() {
winsize w{};
const int status = ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);