mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
#include "FileWatcher.h"
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <errno.h>
|
||||
|
@ -34,7 +34,7 @@ static constexpr unsigned file_watcher_flags_to_inotify_flags(FileWatcherFlags f
|
|||
return result;
|
||||
}
|
||||
|
||||
static Optional<FileWatcherEvent> get_event_from_fd(int fd, HashMap<unsigned, DeprecatedString> const& wd_to_path)
|
||||
static Optional<FileWatcherEvent> get_event_from_fd(int fd, HashMap<unsigned, ByteString> const& wd_to_path)
|
||||
{
|
||||
static constexpr auto max_event_size = sizeof(inotify_event) + NAME_MAX + 1;
|
||||
|
||||
|
@ -123,7 +123,7 @@ FileWatcher::FileWatcher(int watcher_fd, NonnullRefPtr<Notifier> notifier)
|
|||
|
||||
FileWatcher::~FileWatcher() = default;
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::add_watch(DeprecatedString path, FileWatcherEvent::Type event_mask)
|
||||
ErrorOr<bool> FileWatcherBase::add_watch(ByteString path, FileWatcherEvent::Type event_mask)
|
||||
{
|
||||
if (m_path_to_wd.find(path) != m_path_to_wd.end()) {
|
||||
dbgln_if(FILE_WATCHER_DEBUG, "add_watch: path '{}' is already being watched", path);
|
||||
|
@ -154,7 +154,7 @@ ErrorOr<bool> FileWatcherBase::add_watch(DeprecatedString path, FileWatcherEvent
|
|||
return true;
|
||||
}
|
||||
|
||||
ErrorOr<bool> FileWatcherBase::remove_watch(DeprecatedString path)
|
||||
ErrorOr<bool> FileWatcherBase::remove_watch(ByteString path)
|
||||
{
|
||||
auto it = m_path_to_wd.find(path);
|
||||
if (it == m_path_to_wd.end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue