1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 20:37:35 +00:00

Everywhere: Remove the AK:: qualifier from Stream usages

This commit is contained in:
Tim Schumacher 2023-02-10 01:00:18 +01:00 committed by Linus Groh
parent 874c7bba28
commit 43f98ac6e1
73 changed files with 275 additions and 278 deletions

View file

@ -15,13 +15,13 @@ namespace Writer {
class CSV {
public:
template<typename ContainerType>
static ErrorOr<void> generate(AK::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
static ErrorOr<void> generate(Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
{
return XSV<ContainerType>::generate(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors);
}
template<typename ContainerType>
static ErrorOr<void> generate_preview(AK::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
static ErrorOr<void> generate_preview(Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
{
return XSV<ContainerType>::generate_preview(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors);
}

View file

@ -42,7 +42,7 @@ constexpr WriterBehavior default_behaviors()
template<typename ContainerType, typename HeaderType = Vector<StringView>>
class XSV {
public:
static ErrorOr<void> generate(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
static ErrorOr<void> generate(Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
{
auto writer = XSV(output, data, traits, headers, behaviors);
auto with_headers = has_flag(writer.m_behaviors, WriterBehavior::WriteHeaders);
@ -63,7 +63,7 @@ public:
return {};
}
static ErrorOr<void> generate_preview(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
static ErrorOr<void> generate_preview(Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
{
auto writer = XSV(output, data, traits, headers, behaviors);
auto lines_written = 0;
@ -93,7 +93,7 @@ public:
}
private:
XSV(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
XSV(Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
: m_data(data)
, m_traits(move(traits))
, m_behaviors(behaviors)
@ -170,7 +170,7 @@ private:
WriterTraits m_traits;
WriterBehavior m_behaviors;
HeaderType m_names;
AK::Stream& m_output;
Stream& m_output;
};
}