mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-19 18:18:09 +08:00
Execute IWYU (#299)
This commit is contained in:
@@ -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;
|
||||
|
@@ -59,7 +59,6 @@ TEST(StringTest, GlyphCount) {
|
||||
EXPECT_EQ(GlyphCount("a\1a"), 2);
|
||||
}
|
||||
|
||||
|
||||
TEST(StringTest, GlyphPosition) {
|
||||
// Basic:
|
||||
EXPECT_EQ(GlyphPosition("", -1), 0);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user