From 8464da143987e290fa3d9ad739b491e6adbffee6 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 22 Jan 2023 05:09:11 +0100 Subject: AK: Move `Stream` and `SeekableStream` from `LibCore` `Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere. --- Userland/Applications/Spreadsheet/Writers/CSV.h | 4 ++-- Userland/Applications/Spreadsheet/Writers/XSV.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Userland/Applications/Spreadsheet/Writers') diff --git a/Userland/Applications/Spreadsheet/Writers/CSV.h b/Userland/Applications/Spreadsheet/Writers/CSV.h index fb0cbd4ca7..e8e07341d3 100644 --- a/Userland/Applications/Spreadsheet/Writers/CSV.h +++ b/Userland/Applications/Spreadsheet/Writers/CSV.h @@ -15,13 +15,13 @@ namespace Writer { class CSV { public: template - static ErrorOr generate(Core::Stream::Stream& output, ContainerType const& data, Vector headers = {}, WriterBehavior behaviors = default_behaviors()) + static ErrorOr generate(AK::Stream& output, ContainerType const& data, Vector headers = {}, WriterBehavior behaviors = default_behaviors()) { return XSV::generate(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors); } template - static ErrorOr generate_preview(Core::Stream::Stream& output, ContainerType const& data, Vector headers = {}, WriterBehavior behaviors = default_behaviors()) + static ErrorOr generate_preview(AK::Stream& output, ContainerType const& data, Vector headers = {}, WriterBehavior behaviors = default_behaviors()) { return XSV::generate_preview(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors); } diff --git a/Userland/Applications/Spreadsheet/Writers/XSV.h b/Userland/Applications/Spreadsheet/Writers/XSV.h index f81a17d4ed..818e3d3c1c 100644 --- a/Userland/Applications/Spreadsheet/Writers/XSV.h +++ b/Userland/Applications/Spreadsheet/Writers/XSV.h @@ -42,7 +42,7 @@ constexpr WriterBehavior default_behaviors() template> class XSV { public: - static ErrorOr generate(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors()) + static ErrorOr generate(AK::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 generate_preview(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors()) + static ErrorOr generate_preview(AK::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(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors()) + XSV(AK::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; - Core::Stream::Stream& m_output; + AK::Stream& m_output; }; } -- cgit v1.2.3