From 59bbe3ed5e08e9bb40e65b51b51b6ea307d563fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Prokop=20Rand=C3=A1=C4=8Dek?= Date: Sat, 3 Jun 2023 13:59:39 +0200 Subject: [PATCH] fix some warnings (#660) Co-authored-by: ArthurSonzogni --- examples/component/button.cpp | 2 +- examples/component/button_animated.cpp | 2 +- examples/component/button_in_frame.cpp | 2 +- examples/component/button_style.cpp | 2 +- examples/component/canvas_animated.cpp | 2 +- examples/component/checkbox.cpp | 4 ++-- examples/component/checkbox_in_frame.cpp | 2 +- examples/component/collapsible.cpp | 2 +- examples/component/composition.cpp | 2 +- examples/component/custom_loop.cpp | 2 +- examples/component/dropdown.cpp | 2 +- examples/component/flexbox_gallery.cpp | 2 +- examples/component/focus.cpp | 2 +- examples/component/focus_cursor.cpp | 2 +- examples/component/gallery.cpp | 2 +- examples/component/homescreen.cpp | 2 +- examples/component/input.cpp | 2 +- examples/component/input_style.cpp | 2 +- examples/component/linear_gradient_gallery.cpp | 2 +- examples/component/maybe.cpp | 2 +- examples/component/menu.cpp | 2 +- examples/component/menu2.cpp | 2 +- examples/component/menu_entries.cpp | 2 +- examples/component/menu_entries_animated.cpp | 2 +- examples/component/menu_in_frame.cpp | 2 +- examples/component/menu_multiple.cpp | 2 +- examples/component/menu_style.cpp | 2 +- examples/component/menu_underline_animated_gallery.cpp | 2 +- examples/component/modal_dialog_custom.cpp | 2 +- examples/component/nested_screen.cpp | 2 +- examples/component/print_key_press.cpp | 2 +- examples/component/radiobox.cpp | 2 +- examples/component/radiobox_in_frame.cpp | 2 +- examples/component/renderer.cpp | 2 +- examples/component/resizable_split.cpp | 2 +- examples/component/slider.cpp | 2 +- examples/component/slider_direction.cpp | 6 +++--- examples/component/slider_rgb.cpp | 2 +- examples/component/tab_horizontal.cpp | 2 +- examples/component/tab_vertical.cpp | 2 +- examples/component/textarea.cpp | 2 +- examples/component/toggle.cpp | 2 +- examples/dom/border_colored.cpp | 2 +- examples/dom/border_style.cpp | 2 +- examples/dom/canvas.cpp | 2 +- examples/dom/color_info_palette256.cpp | 2 +- examples/dom/color_truecolor_HSV.cpp | 2 +- examples/dom/color_truecolor_RGB.cpp | 2 +- examples/dom/dbox.cpp | 2 +- examples/dom/gauge.cpp | 2 +- examples/dom/gauge_direction.cpp | 2 +- examples/dom/gridbox.cpp | 2 +- examples/dom/hflow.cpp | 2 +- examples/dom/html_like.cpp | 2 +- examples/dom/linear_gradient.cpp | 2 +- examples/dom/package_manager.cpp | 2 +- examples/dom/paragraph.cpp | 4 ++-- examples/dom/separator.cpp | 2 +- examples/dom/separator_style.cpp | 2 +- examples/dom/size.cpp | 2 +- examples/dom/spinner.cpp | 2 +- examples/dom/style_blink.cpp | 2 +- examples/dom/style_bold.cpp | 2 +- examples/dom/style_color.cpp | 2 +- examples/dom/style_dim.cpp | 2 +- examples/dom/style_gallery.cpp | 2 +- examples/dom/style_inverted.cpp | 2 +- examples/dom/style_strikethrough.cpp | 2 +- examples/dom/style_underlined.cpp | 2 +- examples/dom/style_underlined_double.cpp | 2 +- examples/dom/table.cpp | 2 +- examples/dom/vbox_hbox.cpp | 2 +- examples/dom/vflow.cpp | 2 +- 73 files changed, 77 insertions(+), 77 deletions(-) diff --git a/examples/component/button.cpp b/examples/component/button.cpp index b34dfb7..d2cab3c 100644 --- a/examples/component/button.cpp +++ b/examples/component/button.cpp @@ -9,7 +9,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { int value = 50; // The tree of components. This defines how to navigate using the keyboard. diff --git a/examples/component/button_animated.cpp b/examples/component/button_animated.cpp index 9d7948a..86abd7f 100644 --- a/examples/component/button_animated.cpp +++ b/examples/component/button_animated.cpp @@ -11,7 +11,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { int value = 50; // The tree of components. This defines how to navigate using the keyboard. diff --git a/examples/component/button_in_frame.cpp b/examples/component/button_in_frame.cpp index 2eb3393..44034d6 100644 --- a/examples/component/button_in_frame.cpp +++ b/examples/component/button_in_frame.cpp @@ -11,7 +11,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { int counter = 0; auto on_click = [&] { counter++; }; diff --git a/examples/component/button_style.cpp b/examples/component/button_style.cpp index 204237a..340f482 100644 --- a/examples/component/button_style.cpp +++ b/examples/component/button_style.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { int value = 0; auto action = [&] { value++; }; auto action_renderer = diff --git a/examples/component/canvas_animated.cpp b/examples/component/canvas_animated.cpp index 3b8f3b2..b0b6036 100644 --- a/examples/component/canvas_animated.cpp +++ b/examples/component/canvas_animated.cpp @@ -14,7 +14,7 @@ #include "ftxui/dom/canvas.hpp" // for Canvas #include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; int mouse_x = 0; diff --git a/examples/component/checkbox.cpp b/examples/component/checkbox.cpp index 24eb335..9ddf8dc 100644 --- a/examples/component/checkbox.cpp +++ b/examples/component/checkbox.cpp @@ -8,12 +8,12 @@ #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; Component input_list = Container::Vertical({}); std::vector items(100, ""); - for (int i = 0; i < items.size(); ++i) { + for (size_t i = 0; i < items.size(); ++i) { input_list->Add(Input(&(items[i]), "placeholder " + std::to_string(i))); } diff --git a/examples/component/checkbox_in_frame.cpp b/examples/component/checkbox_in_frame.cpp index 54cd43c..ca71d17 100644 --- a/examples/component/checkbox_in_frame.cpp +++ b/examples/component/checkbox_in_frame.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::array states; auto container = Container::Vertical({}); diff --git a/examples/component/collapsible.cpp b/examples/component/collapsible.cpp index 629f4fa..c569b36 100644 --- a/examples/component/collapsible.cpp +++ b/examples/component/collapsible.cpp @@ -26,7 +26,7 @@ Component Empty() { return std::make_shared(); } -int main(int argc, const char* argv[]) { +int main() { auto component = Collapsible("Collapsible 1", Inner({ diff --git a/examples/component/composition.cpp b/examples/component/composition.cpp index 9bc7470..2c49a9e 100644 --- a/examples/component/composition.cpp +++ b/examples/component/composition.cpp @@ -11,7 +11,7 @@ using namespace ftxui; // An example of how to compose multiple components into one and maintain their // interactiveness. -int main(int argc, const char* argv[]) { +int main() { auto left_count = 0; auto right_count = 0; diff --git a/examples/component/custom_loop.cpp b/examples/component/custom_loop.cpp index 05d7f99..2cafe60 100644 --- a/examples/component/custom_loop.cpp +++ b/examples/component/custom_loop.cpp @@ -11,7 +11,7 @@ #include "ftxui/component/loop.hpp" // for Loop #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::FitComponent(); diff --git a/examples/component/dropdown.cpp b/examples/component/dropdown.cpp index 6c8f397..1c4f082 100644 --- a/examples/component/dropdown.cpp +++ b/examples/component/dropdown.cpp @@ -5,7 +5,7 @@ #include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; std::vector entries = { diff --git a/examples/component/flexbox_gallery.cpp b/examples/component/flexbox_gallery.cpp index ff46adf..b0a13a1 100644 --- a/examples/component/flexbox_gallery.cpp +++ b/examples/component/flexbox_gallery.cpp @@ -13,7 +13,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::Fullscreen(); int direction_index = 0; diff --git a/examples/component/focus.cpp b/examples/component/focus.cpp index 71522af..9432d9a 100644 --- a/examples/component/focus.cpp +++ b/examples/component/focus.cpp @@ -31,7 +31,7 @@ Element make_grid() { return gridbox(rows); }; -int main(int argc, const char* argv[]) { +int main() { float focus_x = 0.5f; float focus_y = 0.5f; diff --git a/examples/component/focus_cursor.cpp b/examples/component/focus_cursor.cpp index 3f3a25e..279582b 100644 --- a/examples/component/focus_cursor.cpp +++ b/examples/component/focus_cursor.cpp @@ -19,7 +19,7 @@ Component Instance(std::string label, Decorator focusCursor) { }); }; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::Fullscreen(); screen.Loop(Container::Vertical({ Instance("focus", focus), diff --git a/examples/component/gallery.cpp b/examples/component/gallery.cpp index 31efa44..3d4d16d 100644 --- a/examples/component/gallery.cpp +++ b/examples/component/gallery.cpp @@ -23,7 +23,7 @@ Component Wrap(std::string name, Component component) { }); } -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::FitComponent(); // -- Menu diff --git a/examples/component/homescreen.cpp b/examples/component/homescreen.cpp index a947d69..69be5b3 100644 --- a/examples/component/homescreen.cpp +++ b/examples/component/homescreen.cpp @@ -24,7 +24,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::Fullscreen(); // --------------------------------------------------------------------------- diff --git a/examples/component/input.cpp b/examples/component/input.cpp index 85e1668..3f041f9 100644 --- a/examples/component/input.cpp +++ b/examples/component/input.cpp @@ -9,7 +9,7 @@ #include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border #include "ftxui/util/ref.hpp" // for Ref -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; std::string first_name; diff --git a/examples/component/input_style.cpp b/examples/component/input_style.cpp index f98ae39..f9bf12e 100644 --- a/examples/component/input_style.cpp +++ b/examples/component/input_style.cpp @@ -10,7 +10,7 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|=, Element, bgcolor, operator|, separatorEmpty, color, borderEmpty, separator, text, center, dim, hbox, vbox, border, borderDouble, borderRounded -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; InputOption style_1 = InputOption::Default(); diff --git a/examples/component/linear_gradient_gallery.cpp b/examples/component/linear_gradient_gallery.cpp index e0368c8..0978717 100644 --- a/examples/component/linear_gradient_gallery.cpp +++ b/examples/component/linear_gradient_gallery.cpp @@ -9,7 +9,7 @@ #include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::Fullscreen(); diff --git a/examples/component/maybe.cpp b/examples/component/maybe.cpp index b6930e1..f7b3dbf 100644 --- a/examples/component/maybe.cpp +++ b/examples/component/maybe.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector entries = { "entry 1", "entry 2", diff --git a/examples/component/menu.cpp b/examples/component/menu.cpp index a9d4226..a0d03c6 100644 --- a/examples/component/menu.cpp +++ b/examples/component/menu.cpp @@ -8,7 +8,7 @@ #include "ftxui/component/component_options.hpp" // for MenuOption #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::TerminalOutput(); diff --git a/examples/component/menu2.cpp b/examples/component/menu2.cpp index da811e9..88713df 100644 --- a/examples/component/menu2.cpp +++ b/examples/component/menu2.cpp @@ -10,7 +10,7 @@ #include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive #include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::TerminalOutput(); diff --git a/examples/component/menu_entries.cpp b/examples/component/menu_entries.cpp index 4f9ca9e..38dda85 100644 --- a/examples/component/menu_entries.cpp +++ b/examples/component/menu_entries.cpp @@ -28,7 +28,7 @@ MenuEntryOption Colored(ftxui::Color c) { return option; } -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); int selected = 0; diff --git a/examples/component/menu_entries_animated.cpp b/examples/component/menu_entries_animated.cpp index f8b43d2..a45d562 100644 --- a/examples/component/menu_entries_animated.cpp +++ b/examples/component/menu_entries_animated.cpp @@ -24,7 +24,7 @@ MenuEntryOption Colored(ftxui::Color c) { return option; } -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); int selected = 0; diff --git a/examples/component/menu_in_frame.cpp b/examples/component/menu_in_frame.cpp index b8bec21..43d8677 100644 --- a/examples/component/menu_in_frame.cpp +++ b/examples/component/menu_in_frame.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector entries; int selected = 0; diff --git a/examples/component/menu_multiple.cpp b/examples/component/menu_multiple.cpp index 71c8e11..de99f4e 100644 --- a/examples/component/menu_multiple.cpp +++ b/examples/component/menu_multiple.cpp @@ -17,7 +17,7 @@ Component Window(std::string title, Component component) { }); } -int main(int argc, const char* argv[]) { +int main() { int menu_selected[] = {0, 0, 0}; std::vector> menu_entries = { { diff --git a/examples/component/menu_style.cpp b/examples/component/menu_style.cpp index b7d41fb..b792417 100644 --- a/examples/component/menu_style.cpp +++ b/examples/component/menu_style.cpp @@ -30,7 +30,7 @@ Component HMenu3(std::vector* entries, int* selected); Component HMenu4(std::vector* entries, int* selected); Component HMenu5(std::vector* entries, int* selected); -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); std::vector entries{ diff --git a/examples/component/menu_underline_animated_gallery.cpp b/examples/component/menu_underline_animated_gallery.cpp index 46dbe89..5f7cf7c 100644 --- a/examples/component/menu_underline_animated_gallery.cpp +++ b/examples/component/menu_underline_animated_gallery.cpp @@ -27,7 +27,7 @@ Component Text(const std::string& t) { return Renderer([t] { return text(t) | borderEmpty; }); } -int main(int argc, const char* argv[]) { +int main() { using namespace std::literals; std::vector tab_values{ "Tab 1", "Tab 2", "Tab 3", "A very very long tab", "탭", diff --git a/examples/component/modal_dialog_custom.cpp b/examples/component/modal_dialog_custom.cpp index 8095274..acab25f 100644 --- a/examples/component/modal_dialog_custom.cpp +++ b/examples/component/modal_dialog_custom.cpp @@ -8,7 +8,7 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, Element, filler, text, hbox, separator, center, vbox, bold, border, clear_under, dbox, size, GREATER_THAN, HEIGHT -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::TerminalOutput(); diff --git a/examples/component/nested_screen.cpp b/examples/component/nested_screen.cpp index 5c38a59..aafb134 100644 --- a/examples/component/nested_screen.cpp +++ b/examples/component/nested_screen.cpp @@ -35,7 +35,7 @@ void Nested(std::string path) { screen.Loop(renderer); } -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::FitComponent(); auto button_quit = Button("Quit", screen.ExitLoopClosure()); auto button_nested = Button("Nested", [] { Nested(""); }); diff --git a/examples/component/print_key_press.cpp b/examples/component/print_key_press.cpp index a42f2a4..c481271 100644 --- a/examples/component/print_key_press.cpp +++ b/examples/component/print_key_press.cpp @@ -134,7 +134,7 @@ std::string Stringify(Event event) { return out; } -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); std::vector keys; diff --git a/examples/component/radiobox.cpp b/examples/component/radiobox.cpp index 8be006c..f5a066d 100644 --- a/examples/component/radiobox.cpp +++ b/examples/component/radiobox.cpp @@ -7,7 +7,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector radiobox_list = { "Use gcc", "Use clang", diff --git a/examples/component/radiobox_in_frame.cpp b/examples/component/radiobox_in_frame.cpp index 2ba6434..1b57714 100644 --- a/examples/component/radiobox_in_frame.cpp +++ b/examples/component/radiobox_in_frame.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector entries; int selected = 0; diff --git a/examples/component/renderer.cpp b/examples/component/renderer.cpp index 4f9403b..07ffaf9 100644 --- a/examples/component/renderer.cpp +++ b/examples/component/renderer.cpp @@ -7,7 +7,7 @@ #include "ftxui/dom/elements.hpp" // for operator|, Element, text, bold, border, center, color #include "ftxui/screen/color.hpp" // for Color, Color::Red -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto screen = ScreenInteractive::FitComponent(); diff --git a/examples/component/resizable_split.cpp b/examples/component/resizable_split.cpp index 08a8a5a..066d317 100644 --- a/examples/component/resizable_split.cpp +++ b/examples/component/resizable_split.cpp @@ -8,7 +8,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::Fullscreen(); auto middle = Renderer([] { return text("middle") | center; }); diff --git a/examples/component/slider.cpp b/examples/component/slider.cpp index 75a51a5..c2e67a1 100644 --- a/examples/component/slider.cpp +++ b/examples/component/slider.cpp @@ -4,7 +4,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); int value = 50; auto slider = Slider("Value:", &value, 0, 100, 1); diff --git a/examples/component/slider_direction.cpp b/examples/component/slider_direction.cpp index f1a4ff5..33b7800 100644 --- a/examples/component/slider_direction.cpp +++ b/examples/component/slider_direction.cpp @@ -13,7 +13,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { auto screen = ScreenInteractive::TerminalOutput(); std::array values; for (int i = 0; i < values.size(); ++i) { @@ -21,10 +21,10 @@ int main(int argc, const char* argv[]) { } auto layout_horizontal = Container::Horizontal({}); - for (int i = 0; i < values.size(); ++i) { + for (auto& value : values) { // In C++17: SliderOption option; - option.value = &values[i]; + option.value = &value; option.max = 100; option.increment = 5; option.direction = Direction::Up; diff --git a/examples/component/slider_rgb.cpp b/examples/component/slider_rgb.cpp index ce4fd31..f3eb2f8 100644 --- a/examples/component/slider_rgb.cpp +++ b/examples/component/slider_rgb.cpp @@ -23,7 +23,7 @@ Element ColorString(int red, int green, int blue) { ); } -int main(int argc, const char* argv[]) { +int main() { int red = 128; int green = 25; int blue = 100; diff --git a/examples/component/tab_horizontal.cpp b/examples/component/tab_horizontal.cpp index cddb3c2..a1faefe 100644 --- a/examples/component/tab_horizontal.cpp +++ b/examples/component/tab_horizontal.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector tab_values{ "tab_1", "tab_2", diff --git a/examples/component/tab_vertical.cpp b/examples/component/tab_vertical.cpp index 2db026f..ad06b82 100644 --- a/examples/component/tab_vertical.cpp +++ b/examples/component/tab_vertical.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector tab_values{ "tab_1", "tab_2", diff --git a/examples/component/textarea.cpp b/examples/component/textarea.cpp index b8753b3..5ea7721 100644 --- a/examples/component/textarea.cpp +++ b/examples/component/textarea.cpp @@ -7,7 +7,7 @@ #include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive #include "ftxui/dom/elements.hpp" // for operator|, separator, text, Element, flex, vbox, border -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; std::string content_1; diff --git a/examples/component/toggle.cpp b/examples/component/toggle.cpp index bea69ce..f1f3b06 100644 --- a/examples/component/toggle.cpp +++ b/examples/component/toggle.cpp @@ -10,7 +10,7 @@ using namespace ftxui; -int main(int argc, const char* argv[]) { +int main() { std::vector toggle_1_entries = { "On", "Off", diff --git a/examples/dom/border_colored.cpp b/examples/dom/border_colored.cpp index b105754..95bead5 100644 --- a/examples/dom/border_colored.cpp +++ b/examples/dom/border_colored.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto make_boxed = [] { diff --git a/examples/dom/border_style.cpp b/examples/dom/border_style.cpp index 995ee95..e16f53f 100644 --- a/examples/dom/border_style.cpp +++ b/examples/dom/border_style.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = vbox({ diff --git a/examples/dom/canvas.cpp b/examples/dom/canvas.cpp index b99ec0a..f61cd4d 100644 --- a/examples/dom/canvas.cpp +++ b/examples/dom/canvas.cpp @@ -8,7 +8,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto c = Canvas(100, 100); diff --git a/examples/dom/color_info_palette256.cpp b/examples/dom/color_info_palette256.cpp index dd58794..3cc383d 100644 --- a/examples/dom/color_info_palette256.cpp +++ b/examples/dom/color_info_palette256.cpp @@ -10,7 +10,7 @@ using namespace ftxui; #include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D -int main(int argc, const char* argv[]) { +int main() { std::vector> info_columns = ColorInfoSorted2D(); // Draw every columns diff --git a/examples/dom/color_truecolor_HSV.cpp b/examples/dom/color_truecolor_HSV.cpp index 9f8b7e9..d519069 100644 --- a/examples/dom/color_truecolor_HSV.cpp +++ b/examples/dom/color_truecolor_HSV.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; int saturation = 255; diff --git a/examples/dom/color_truecolor_RGB.cpp b/examples/dom/color_truecolor_RGB.cpp index c8ab0d0..65cc04c 100644 --- a/examples/dom/color_truecolor_RGB.cpp +++ b/examples/dom/color_truecolor_RGB.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; int saturation = 255; diff --git a/examples/dom/dbox.cpp b/examples/dom/dbox.cpp index 642d26b..b1f347c 100644 --- a/examples/dom/dbox.cpp +++ b/examples/dom/dbox.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = dbox({ vbox({ diff --git a/examples/dom/gauge.cpp b/examples/dom/gauge.cpp index 397dd5a..d12fbcb 100644 --- a/examples/dom/gauge.cpp +++ b/examples/dom/gauge.cpp @@ -8,7 +8,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; using namespace std::chrono_literals; diff --git a/examples/dom/gauge_direction.cpp b/examples/dom/gauge_direction.cpp index d26eecf..f7ebef8 100644 --- a/examples/dom/gauge_direction.cpp +++ b/examples/dom/gauge_direction.cpp @@ -8,7 +8,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; using namespace std::chrono_literals; diff --git a/examples/dom/gridbox.cpp b/examples/dom/gridbox.cpp index 3de7b55..4c5c989 100644 --- a/examples/dom/gridbox.cpp +++ b/examples/dom/gridbox.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto cell = [](const char* t) { return text(t) | border; }; auto document = // diff --git a/examples/dom/hflow.cpp b/examples/dom/hflow.cpp index d010861..01b2886 100644 --- a/examples/dom/hflow.cpp +++ b/examples/dom/hflow.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto make_box = [](int dimx, int dimy) { std::string title = std::to_string(dimx) + "x" + std::to_string(dimy); diff --git a/examples/dom/html_like.cpp b/examples/dom/html_like.cpp index adab1b8..fc75959 100644 --- a/examples/dom/html_like.cpp +++ b/examples/dom/html_like.cpp @@ -9,7 +9,7 @@ #include "ftxui/screen/box.hpp" // for ftxui #include "ftxui/screen/color.hpp" // for Color, Color::Red -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; using namespace std::chrono_literals; diff --git a/examples/dom/linear_gradient.cpp b/examples/dom/linear_gradient.cpp index affc370..3d5fb9a 100644 --- a/examples/dom/linear_gradient.cpp +++ b/examples/dom/linear_gradient.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::DeepPink1, Color::DeepSkyBlue1, Color::Yellow, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = text("gradient") | center; diff --git a/examples/dom/package_manager.cpp b/examples/dom/package_manager.cpp index 5f48f93..b21d81a 100644 --- a/examples/dom/package_manager.cpp +++ b/examples/dom/package_manager.cpp @@ -12,7 +12,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Green, Color::Red, Color::RedLight, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; struct Task { diff --git a/examples/dom/paragraph.cpp b/examples/dom/paragraph.cpp index 0223e1a..2529aff 100644 --- a/examples/dom/paragraph.cpp +++ b/examples/dom/paragraph.cpp @@ -10,13 +10,13 @@ #include "ftxui/screen/box.hpp" // for ftxui using namespace std::chrono_literals; -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; std::string p = R"(In probability theory and statistics, Bayes' theorem (alternatively Bayes' law or Bayes' rule) describes the probability of an event, based on prior knowledge of conditions that might be related to the event. For example, if cancer is related to age, then, using Bayes' theorem, a person's age can be used to more accurately assess the probability that they have cancer, compared to the assessment of the probability of cancer made without knowledge of the person's age. One of the many applications of Bayes' theorem is Bayesian inference, a particular approach to statistical inference. When applied, the probabilities involved in Bayes' theorem may have different probability interpretations. With the Bayesian probability interpretation the theorem expresses how a subjective degree of belief should rationally change to account for availability of related evidence. Bayesian inference is fundamental to Bayesian statistics.)"; std::string reset_position; - for (int i = 0;; ++i) { + while (true) { auto document = vbox({ hflow(paragraph(p)), separator(), diff --git a/examples/dom/separator.cpp b/examples/dom/separator.cpp index 00c0e68..3b8a3a5 100644 --- a/examples/dom/separator.cpp +++ b/examples/dom/separator.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = hbox({ text("left-column"), diff --git a/examples/dom/separator_style.cpp b/examples/dom/separator_style.cpp index 2d72777..1e2eb3b 100644 --- a/examples/dom/separator_style.cpp +++ b/examples/dom/separator_style.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/box.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = vbox({ diff --git a/examples/dom/size.cpp b/examples/dom/size.cpp index 0bcf997..5cc7c36 100644 --- a/examples/dom/size.cpp +++ b/examples/dom/size.cpp @@ -7,7 +7,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto make_box = [](const std::string& title) { return window(text(title) | hcenter | bold, diff --git a/examples/dom/spinner.cpp b/examples/dom/spinner.cpp index d73c77b..4f8215b 100644 --- a/examples/dom/spinner.cpp +++ b/examples/dom/spinner.cpp @@ -10,7 +10,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; using namespace std::chrono_literals; diff --git a/examples/dom/style_blink.cpp b/examples/dom/style_blink.cpp index d463d28..f3d7250 100644 --- a/examples/dom/style_blink.cpp +++ b/examples/dom/style_blink.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/style_bold.cpp b/examples/dom/style_bold.cpp index 4322aba..1386f11 100644 --- a/examples/dom/style_bold.cpp +++ b/examples/dom/style_bold.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/style_color.cpp b/examples/dom/style_color.cpp index de4a293..f05d36f 100644 --- a/examples/dom/style_color.cpp +++ b/examples/dom/style_color.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, operator""_rgb, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::DeepSkyBlue4, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::SkyBlue1, Color::White, Color::Yellow, Color::YellowLight, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = hbox({ vbox({ diff --git a/examples/dom/style_dim.cpp b/examples/dom/style_dim.cpp index 6d5862e..a5b02af 100644 --- a/examples/dom/style_dim.cpp +++ b/examples/dom/style_dim.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/style_gallery.cpp b/examples/dom/style_gallery.cpp index 8826388..c958c57 100644 --- a/examples/dom/style_gallery.cpp +++ b/examples/dom/style_gallery.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Blue, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; // clang-format off auto document = diff --git a/examples/dom/style_inverted.cpp b/examples/dom/style_inverted.cpp index 56e5103..e97cec3 100644 --- a/examples/dom/style_inverted.cpp +++ b/examples/dom/style_inverted.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = hbox({ text("This text is "), diff --git a/examples/dom/style_strikethrough.cpp b/examples/dom/style_strikethrough.cpp index c2c8355..89b4764 100644 --- a/examples/dom/style_strikethrough.cpp +++ b/examples/dom/style_strikethrough.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/style_underlined.cpp b/examples/dom/style_underlined.cpp index dde6e80..8413b84 100644 --- a/examples/dom/style_underlined.cpp +++ b/examples/dom/style_underlined.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/style_underlined_double.cpp b/examples/dom/style_underlined_double.cpp index ea2a998..496ab67 100644 --- a/examples/dom/style_underlined_double.cpp +++ b/examples/dom/style_underlined_double.cpp @@ -5,7 +5,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // hbox({ diff --git a/examples/dom/table.cpp b/examples/dom/table.cpp index 947abcf..640d7af 100644 --- a/examples/dom/table.cpp +++ b/examples/dom/table.cpp @@ -8,7 +8,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::White, ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto table = Table({ diff --git a/examples/dom/vbox_hbox.cpp b/examples/dom/vbox_hbox.cpp index a4e6c81..8434f5f 100644 --- a/examples/dom/vbox_hbox.cpp +++ b/examples/dom/vbox_hbox.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto document = // vbox({ diff --git a/examples/dom/vflow.cpp b/examples/dom/vflow.cpp index 7a97e9a..96e9e84 100644 --- a/examples/dom/vflow.cpp +++ b/examples/dom/vflow.cpp @@ -6,7 +6,7 @@ #include "ftxui/dom/node.hpp" // for Render #include "ftxui/screen/color.hpp" // for ftxui -int main(int argc, const char* argv[]) { +int main() { using namespace ftxui; auto make_box = [](int dimx, int dimy) { std::string title = std::to_string(dimx) + "x" + std::to_string(dimy);