mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
AK: Remove the deprecated Stream implementation :^)
This commit is contained in:
parent
63b11030f0
commit
e8d5e938de
11 changed files with 1 additions and 708 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/DeprecatedStream.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Format.h>
|
||||
#include <AK/Function.h>
|
||||
|
@ -416,29 +415,6 @@ bool DeprecatedString::operator==(char const* cstring) const
|
|||
return view() == cstring;
|
||||
}
|
||||
|
||||
DeprecatedInputStream& operator>>(DeprecatedInputStream& stream, DeprecatedString& string)
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
for (;;) {
|
||||
char next_char;
|
||||
stream >> next_char;
|
||||
|
||||
if (stream.has_any_error()) {
|
||||
stream.set_fatal_error();
|
||||
string = nullptr;
|
||||
return stream;
|
||||
}
|
||||
|
||||
if (next_char) {
|
||||
builder.append(next_char);
|
||||
} else {
|
||||
string = builder.to_deprecated_string();
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeprecatedString DeprecatedString::vformatted(StringView fmtstr, TypeErasedFormatParams& params)
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue