mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
GDirectoryModel: Fix redundant identical comparison.
Found by PVS-Studio.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 12:57:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/673a98258b2
@@ -158,9 +158,9 @@ GIcon GDirectoryModel::icon_for(const Entry& entry) const
|
||||
} else {
|
||||
thumbnail_cache().resource().set(path, nullptr);
|
||||
}
|
||||
if (!entry.thumbnail)
|
||||
return m_filetype_image_icon;
|
||||
}
|
||||
if (!entry.thumbnail)
|
||||
return m_filetype_image_icon;
|
||||
return GIcon(m_filetype_image_icon.bitmap_for_size(16), *entry.thumbnail);
|
||||
}
|
||||
return m_file_icon;
|
||||
|
||||
Reference in New Issue
Block a user