mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
Welcome: Apply @shannonbooth's recommendations
This commit is contained in:
parent
c07c442640
commit
51628f64fa
Notes:
sideshowbarker
2024-07-19 17:40:26 +09:00
Author: https://github.com/thatlittlegit Commit: https://github.com/SerenityOS/serenity/commit/51628f64fa2 Pull-request: https://github.com/SerenityOS/serenity/pull/1221 Reviewed-by: https://github.com/shannonbooth
1 changed files with 4 additions and 4 deletions
|
@ -71,9 +71,9 @@ Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
|
|||
if (file->error()) {
|
||||
file->close();
|
||||
return error;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
auto line = String((char*)buffer.data());
|
||||
|
@ -101,7 +101,7 @@ Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
|
|||
case '\n':
|
||||
dbg() << "newline";
|
||||
|
||||
if (current_output_line.to_string() != String::empty())
|
||||
if (!current_output_line.to_string().is_empty())
|
||||
current.content.append(current_output_line.to_string());
|
||||
current_output_line.clear();
|
||||
break;
|
||||
|
@ -214,7 +214,7 @@ int main(int argc, char** argv)
|
|||
title_box->set_preferred_size(0, 16);
|
||||
title_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
|
||||
if (page.icon != String::empty()) {
|
||||
if (!page.icon.is_empty()) {
|
||||
auto icon = GUI::Label::construct(title_box);
|
||||
icon->set_icon(Gfx::Bitmap::load_from_file(page.icon));
|
||||
icon->set_preferred_size(16, 16);
|
||||
|
|
Loading…
Add table
Reference in a new issue