mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 17:18:11 +00:00
AK: Rename Stream::read_entire_buffer to Stream::read_until_filled
No functional changes.
This commit is contained in:
parent
d5871f5717
commit
a3f73e7d85
31 changed files with 58 additions and 58 deletions
|
@ -210,7 +210,7 @@ struct ConvertToRaw<float> {
|
|||
LittleEndian<u32> res;
|
||||
ReadonlyBytes bytes { &value, sizeof(float) };
|
||||
FixedMemoryStream stream { bytes };
|
||||
stream.read_entire_buffer(res.bytes()).release_value_but_fixme_should_propagate_errors();
|
||||
stream.read_until_filled(res.bytes()).release_value_but_fixme_should_propagate_errors();
|
||||
return static_cast<u32>(res);
|
||||
}
|
||||
};
|
||||
|
@ -222,7 +222,7 @@ struct ConvertToRaw<double> {
|
|||
LittleEndian<u64> res;
|
||||
ReadonlyBytes bytes { &value, sizeof(double) };
|
||||
FixedMemoryStream stream { bytes };
|
||||
stream.read_entire_buffer(res.bytes()).release_value_but_fixme_should_propagate_errors();
|
||||
stream.read_until_filled(res.bytes()).release_value_but_fixme_should_propagate_errors();
|
||||
return static_cast<u64>(res);
|
||||
}
|
||||
};
|
||||
|
@ -260,7 +260,7 @@ T BytecodeInterpreter::read_value(ReadonlyBytes data)
|
|||
{
|
||||
LittleEndian<T> value;
|
||||
FixedMemoryStream stream { data };
|
||||
auto maybe_error = stream.read_entire_buffer(value.bytes());
|
||||
auto maybe_error = stream.read_until_filled(value.bytes());
|
||||
if (maybe_error.is_error()) {
|
||||
dbgln("Read from {} failed", data.data());
|
||||
m_trap = Trap { "Read from memory failed" };
|
||||
|
@ -273,7 +273,7 @@ float BytecodeInterpreter::read_value<float>(ReadonlyBytes data)
|
|||
{
|
||||
LittleEndian<u32> raw_value;
|
||||
FixedMemoryStream stream { data };
|
||||
auto maybe_error = stream.read_entire_buffer(raw_value.bytes());
|
||||
auto maybe_error = stream.read_until_filled(raw_value.bytes());
|
||||
if (maybe_error.is_error())
|
||||
m_trap = Trap { "Read from memory failed" };
|
||||
return bit_cast<float>(static_cast<u32>(raw_value));
|
||||
|
@ -284,7 +284,7 @@ double BytecodeInterpreter::read_value<double>(ReadonlyBytes data)
|
|||
{
|
||||
LittleEndian<u64> raw_value;
|
||||
FixedMemoryStream stream { data };
|
||||
auto maybe_error = stream.read_entire_buffer(raw_value.bytes());
|
||||
auto maybe_error = stream.read_until_filled(raw_value.bytes());
|
||||
if (maybe_error.is_error())
|
||||
m_trap = Trap { "Read from memory failed" };
|
||||
return bit_cast<double>(static_cast<u64>(raw_value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue