mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +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
|
@ -46,7 +46,7 @@ ErrorOr<int> Socket::create_fd(SocketDomain domain, SocketType type)
|
|||
#endif
|
||||
}
|
||||
|
||||
ErrorOr<IPv4Address> Socket::resolve_host(DeprecatedString const& host, SocketType type)
|
||||
ErrorOr<IPv4Address> Socket::resolve_host(ByteString const& host, SocketType type)
|
||||
{
|
||||
int socket_type;
|
||||
switch (type) {
|
||||
|
@ -79,7 +79,7 @@ ErrorOr<IPv4Address> Socket::resolve_host(DeprecatedString const& host, SocketTy
|
|||
return Error::from_string_literal("Could not resolve to IPv4 address");
|
||||
}
|
||||
|
||||
ErrorOr<void> Socket::connect_local(int fd, DeprecatedString const& path)
|
||||
ErrorOr<void> Socket::connect_local(int fd, ByteString const& path)
|
||||
{
|
||||
auto address = SocketAddress::local(path);
|
||||
auto maybe_sockaddr = address.to_sockaddr_un();
|
||||
|
@ -189,7 +189,7 @@ void PosixSocketHelper::setup_notifier()
|
|||
m_notifier = Core::Notifier::construct(m_fd, Core::Notifier::Type::Read);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<TCPSocket>> TCPSocket::connect(DeprecatedString const& host, u16 port)
|
||||
ErrorOr<NonnullOwnPtr<TCPSocket>> TCPSocket::connect(ByteString const& host, u16 port)
|
||||
{
|
||||
auto ip_address = TRY(resolve_host(host, SocketType::Stream));
|
||||
return connect(SocketAddress { ip_address, port });
|
||||
|
@ -231,7 +231,7 @@ ErrorOr<size_t> PosixSocketHelper::pending_bytes() const
|
|||
return static_cast<size_t>(value);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<UDPSocket>> UDPSocket::connect(DeprecatedString const& host, u16 port, Optional<Duration> timeout)
|
||||
ErrorOr<NonnullOwnPtr<UDPSocket>> UDPSocket::connect(ByteString const& host, u16 port, Optional<Duration> timeout)
|
||||
{
|
||||
auto ip_address = TRY(resolve_host(host, SocketType::Datagram));
|
||||
return connect(SocketAddress { ip_address, port }, timeout);
|
||||
|
@ -253,7 +253,7 @@ ErrorOr<NonnullOwnPtr<UDPSocket>> UDPSocket::connect(SocketAddress const& addres
|
|||
return socket;
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<LocalSocket>> LocalSocket::connect(DeprecatedString const& path, PreventSIGPIPE prevent_sigpipe)
|
||||
ErrorOr<NonnullOwnPtr<LocalSocket>> LocalSocket::connect(ByteString const& path, PreventSIGPIPE prevent_sigpipe)
|
||||
{
|
||||
auto socket = TRY(adopt_nonnull_own_or_enomem(new (nothrow) LocalSocket(prevent_sigpipe)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue