mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 20:57:44 +00:00
AK+Userland: Remove nullability feature for the ByteBuffer type
Nobody seems to use this particular feature, in fact there were some bugs which were uncovered by removing operator bool.
This commit is contained in:
parent
c4d0b0cd6b
commit
53d0150827
16 changed files with 12 additions and 36 deletions
|
@ -143,7 +143,7 @@ int perform_copy(const String& source, const String& destination)
|
|||
while (true) {
|
||||
print_progress();
|
||||
auto buffer = source_file.read(65536);
|
||||
if (buffer.is_null())
|
||||
if (buffer.is_empty())
|
||||
break;
|
||||
if (!destination_file.write(buffer)) {
|
||||
report_warning(String::formatted("Failed to write to destination file: {}", destination_file.error_string()));
|
||||
|
|
|
@ -168,7 +168,7 @@ Vector<DNSAnswer> MulticastDNS::lookup(const DNSName& name, DNSRecordType record
|
|||
}
|
||||
|
||||
auto buffer = receive(1024);
|
||||
if (!buffer)
|
||||
if (buffer.is_empty())
|
||||
return {};
|
||||
auto optional_packet = DNSPacket::from_raw_packet(buffer.data(), buffer.size());
|
||||
if (!optional_packet.has_value()) {
|
||||
|
|
|
@ -41,7 +41,7 @@ void Client::start()
|
|||
{
|
||||
m_socket->on_ready_to_read = [this] {
|
||||
auto raw_request = m_socket->read_all();
|
||||
if (raw_request.is_null()) {
|
||||
if (raw_request.is_empty()) {
|
||||
die();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue