1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

AK+Everywhere: Remove the null state of DeprecatedString

This commit removes DeprecatedString's "null" state, and replaces all
its users with one of the following:
- A normal, empty DeprecatedString
- Optional<DeprecatedString>

Note that null states of DeprecatedFlyString/StringView/etc are *not*
affected by this commit. However, DeprecatedString::empty() is now
considered equal to a null StringView.
This commit is contained in:
Ali Mohammad Pur 2023-10-10 15:00:58 +03:30 committed by Ali Mohammad Pur
parent daf6d8173c
commit aeee98b3a1
189 changed files with 597 additions and 652 deletions

View file

@ -31,7 +31,7 @@ bool ScreenLayout::is_valid(DeprecatedString* error_msg) const
int smallest_y = 0;
for (size_t i = 0; i < screens.size(); i++) {
auto& screen = screens[i];
if (screen.mode == Screen::Mode::Device && (screen.device->is_empty() || screen.device->is_null())) {
if (screen.mode == Screen::Mode::Device && screen.device->is_empty()) {
if (error_msg)
*error_msg = DeprecatedString::formatted("Screen #{} has no path", i);
return false;