mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 07:55:07 +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:
parent
daf6d8173c
commit
aeee98b3a1
189 changed files with 597 additions and 652 deletions
|
@ -68,7 +68,7 @@ bool FileSystemModel::Node::fetch_data(DeprecatedString const& full_path, bool i
|
|||
perror("readlink");
|
||||
else {
|
||||
symlink_target = sym_link_target_or_error.release_value().to_deprecated_string();
|
||||
if (symlink_target.is_null())
|
||||
if (symlink_target.is_empty())
|
||||
perror("readlink");
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ void FileSystemModel::update_node_on_selection(ModelIndex const& index, bool con
|
|||
|
||||
void FileSystemModel::set_root_path(DeprecatedString root_path)
|
||||
{
|
||||
if (root_path.is_null())
|
||||
if (root_path.is_empty())
|
||||
m_root_path = {};
|
||||
else
|
||||
m_root_path = LexicalPath::canonicalized_path(move(root_path));
|
||||
|
@ -382,7 +382,7 @@ void FileSystemModel::invalidate()
|
|||
{
|
||||
m_root = adopt_own(*new Node(*this));
|
||||
|
||||
if (m_root_path.is_null())
|
||||
if (m_root_path.is_empty())
|
||||
m_root->m_parent_of_root = true;
|
||||
|
||||
m_root->reify_if_needed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue