mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -7,12 +7,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/EnumBits.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <Kernel/API/InodeWatcherEvent.h>
|
||||
#include <Kernel/API/InodeWatcherFlags.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
|
@ -29,7 +29,7 @@ struct FileWatcherEvent {
|
|||
ChildDeleted = 1 << 4,
|
||||
};
|
||||
Type type;
|
||||
String event_path;
|
||||
DeprecatedString event_path;
|
||||
};
|
||||
|
||||
AK_ENUM_BITWISE_OPERATORS(FileWatcherEvent::Type);
|
||||
|
@ -38,9 +38,9 @@ class FileWatcherBase {
|
|||
public:
|
||||
virtual ~FileWatcherBase() = default;
|
||||
|
||||
ErrorOr<bool> add_watch(String path, FileWatcherEvent::Type event_mask);
|
||||
ErrorOr<bool> remove_watch(String path);
|
||||
bool is_watching(String const& path) const { return m_path_to_wd.find(path) != m_path_to_wd.end(); }
|
||||
ErrorOr<bool> add_watch(DeprecatedString path, FileWatcherEvent::Type event_mask);
|
||||
ErrorOr<bool> remove_watch(DeprecatedString path);
|
||||
bool is_watching(DeprecatedString const& path) const { return m_path_to_wd.find(path) != m_path_to_wd.end(); }
|
||||
|
||||
protected:
|
||||
FileWatcherBase(int watcher_fd)
|
||||
|
@ -49,8 +49,8 @@ protected:
|
|||
}
|
||||
|
||||
int m_watcher_fd { -1 };
|
||||
HashMap<String, unsigned> m_path_to_wd;
|
||||
HashMap<unsigned, String> m_wd_to_path;
|
||||
HashMap<DeprecatedString, unsigned> m_path_to_wd;
|
||||
HashMap<unsigned, DeprecatedString> m_wd_to_path;
|
||||
};
|
||||
|
||||
class BlockingFileWatcher final : public FileWatcherBase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue