mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:14:58 +00:00
LibGUI: Cast unused smart-pointer return values to void
This commit is contained in:
parent
907feb84a0
commit
d95e50643e
4 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ ErrorOr<NonnullRefPtr<SettingsWindow>> SettingsWindow::create(String title, Show
|
||||||
|
|
||||||
auto main_widget = TRY(window->try_set_main_widget<GUI::Widget>());
|
auto main_widget = TRY(window->try_set_main_widget<GUI::Widget>());
|
||||||
main_widget->set_fill_with_background_color(true);
|
main_widget->set_fill_with_background_color(true);
|
||||||
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>());
|
(void)TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>());
|
||||||
main_widget->layout()->set_margins(4);
|
main_widget->layout()->set_margins(4);
|
||||||
main_widget->layout()->set_spacing(6);
|
main_widget->layout()->set_spacing(6);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ ErrorOr<NonnullRefPtr<SettingsWindow>> SettingsWindow::create(String title, Show
|
||||||
|
|
||||||
auto button_container = TRY(main_widget->try_add<GUI::Widget>());
|
auto button_container = TRY(main_widget->try_add<GUI::Widget>());
|
||||||
button_container->set_shrink_to_fit(true);
|
button_container->set_shrink_to_fit(true);
|
||||||
TRY(button_container->try_set_layout<GUI::HorizontalBoxLayout>());
|
(void)TRY(button_container->try_set_layout<GUI::HorizontalBoxLayout>());
|
||||||
button_container->layout()->set_spacing(6);
|
button_container->layout()->set_spacing(6);
|
||||||
|
|
||||||
if (show_defaults_button == ShowDefaultsButton::Yes) {
|
if (show_defaults_button == ShowDefaultsButton::Yes) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ bool TextDocument::set_text(StringView text, AllowCallback allow_callback)
|
||||||
|
|
||||||
// Don't show the file's trailing newline as an actual new line.
|
// Don't show the file's trailing newline as an actual new line.
|
||||||
if (line_count() > 1 && line(line_count() - 1).is_empty())
|
if (line_count() > 1 && line(line_count() - 1).is_empty())
|
||||||
m_lines.take_last();
|
(void)m_lines.take_last();
|
||||||
|
|
||||||
m_client_notifications_enabled = true;
|
m_client_notifications_enabled = true;
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ ErrorOr<void> Toolbar::try_add_separator()
|
||||||
|
|
||||||
auto item = TRY(adopt_nonnull_own_or_enomem(new (nothrow) Item));
|
auto item = TRY(adopt_nonnull_own_or_enomem(new (nothrow) Item));
|
||||||
item->type = Item::Type::Separator;
|
item->type = Item::Type::Separator;
|
||||||
TRY(try_add<SeparatorWidget>(m_orientation == Gfx::Orientation::Horizontal ? Gfx::Orientation::Vertical : Gfx::Orientation::Horizontal));
|
(void)TRY(try_add<SeparatorWidget>(m_orientation == Gfx::Orientation::Horizontal ? Gfx::Orientation::Vertical : Gfx::Orientation::Horizontal));
|
||||||
m_items.unchecked_append(move(item));
|
m_items.unchecked_append(move(item));
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ void UndoStack::push(NonnullOwnPtr<Command> command)
|
||||||
{
|
{
|
||||||
// If the stack cursor is behind the top of the stack, nuke everything from here to the top.
|
// If the stack cursor is behind the top of the stack, nuke everything from here to the top.
|
||||||
while (m_stack.size() != m_stack_index)
|
while (m_stack.size() != m_stack_index)
|
||||||
m_stack.take_last();
|
(void)m_stack.take_last();
|
||||||
|
|
||||||
if (m_clean_index.has_value() && m_clean_index.value() > m_stack.size())
|
if (m_clean_index.has_value() && m_clean_index.value() > m_stack.size())
|
||||||
m_clean_index = {};
|
m_clean_index = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue