diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-16 21:17:12 +0000 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-02-18 16:56:56 +0000 |
commit | 6b66e39df443d4be087cb1b9cb1eeba5341811b0 (patch) | |
tree | 117e1d5a7ff29e1451a4b6b97344c6b8c71aaa61 /Userland/Applications/CrashReporter | |
parent | 77ad0fdb0726aba2ecaf7ea9764a642671d1fd6f (diff) | |
download | serenity-6b66e39df443d4be087cb1b9cb1eeba5341811b0.zip |
LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
Diffstat (limited to 'Userland/Applications/CrashReporter')
-rw-r--r-- | Userland/Applications/CrashReporter/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 60f67619ca..eceba09693 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -216,7 +216,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto& tab_widget = *widget->find_descendant_of_type_named<GUI::TabWidget>("tab_widget"); auto backtrace_tab = TRY(tab_widget.try_add_tab<GUI::Widget>("Backtrace")); - (void)TRY(backtrace_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); + TRY(backtrace_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); auto backtrace_label = TRY(backtrace_tab->try_add<GUI::Label>("A backtrace for each thread alive during the crash is listed below:")); backtrace_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); @@ -236,7 +236,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) cpu_registers_tab_widget->set_tab_position(GUI::TabWidget::TabPosition::Bottom); auto environment_tab = TRY(tab_widget.try_add_tab<GUI::Widget>("Environment")); - (void)TRY(environment_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); + TRY(environment_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); auto environment_text_editor = TRY(environment_tab->try_add<GUI::TextEditor>()); environment_text_editor->set_text(DeprecatedString::join('\n', environment)); @@ -245,7 +245,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) environment_text_editor->set_should_hide_unnecessary_scrollbars(true); auto memory_regions_tab = TRY(tab_widget.try_add_tab<GUI::Widget>("Memory Regions")); - (void)TRY(memory_regions_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); + TRY(memory_regions_tab->try_set_layout<GUI::VerticalBoxLayout>(4)); auto memory_regions_text_editor = TRY(memory_regions_tab->try_add<GUI::TextEditor>()); memory_regions_text_editor->set_text(DeprecatedString::join('\n', memory_regions)); @@ -303,7 +303,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) [&](auto results) -> ErrorOr<void> { for (auto& backtrace : results.thread_backtraces) { auto container = TRY(backtrace_tab_widget->try_add_tab<GUI::Widget>(backtrace.title)); - (void)TRY(container->template try_set_layout<GUI::VerticalBoxLayout>(4)); + TRY(container->template try_set_layout<GUI::VerticalBoxLayout>(4)); auto backtrace_text_editor = TRY(container->template try_add<GUI::TextEditor>()); backtrace_text_editor->set_text(backtrace.text); backtrace_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); @@ -314,7 +314,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) for (auto& cpu_registers : results.thread_cpu_registers) { auto container = TRY(cpu_registers_tab_widget->try_add_tab<GUI::Widget>(cpu_registers.title)); - (void)TRY(container->template try_set_layout<GUI::VerticalBoxLayout>(4)); + TRY(container->template try_set_layout<GUI::VerticalBoxLayout>(4)); auto cpu_registers_text_editor = TRY(container->template try_add<GUI::TextEditor>()); cpu_registers_text_editor->set_text(cpu_registers.text); cpu_registers_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); |