mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:47:34 +00:00
LibCore: Rename File
to DeprecatedFile
As usual, this removes many unused includes and moves used includes further down the chain.
This commit is contained in:
parent
14951b92ca
commit
d43a7eae54
193 changed files with 536 additions and 556 deletions
|
@ -14,7 +14,6 @@
|
|||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibAudio/Loader.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/Stream.h>
|
||||
|
||||
namespace Audio {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <LibAudio/WavWriter.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
|
||||
namespace Audio {
|
||||
|
||||
|
@ -31,7 +32,7 @@ WavWriter::~WavWriter()
|
|||
|
||||
void WavWriter::set_file(StringView path)
|
||||
{
|
||||
m_file = Core::File::construct(path);
|
||||
m_file = Core::DeprecatedFile::construct(path);
|
||||
if (!m_file->open(Core::OpenMode::ReadWrite)) {
|
||||
m_error_string = DeprecatedString::formatted("Can't open file: {}", m_file->error_string());
|
||||
return;
|
||||
|
|
|
@ -6,10 +6,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibAudio/Sample.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibCore/Forward.h>
|
||||
|
||||
namespace Audio {
|
||||
|
||||
|
@ -31,7 +34,7 @@ public:
|
|||
u32 sample_rate() const { return m_sample_rate; }
|
||||
u16 num_channels() const { return m_num_channels; }
|
||||
u16 bits_per_sample() const { return m_bits_per_sample; }
|
||||
RefPtr<Core::File> file() const { return m_file; }
|
||||
RefPtr<Core::DeprecatedFile> file() const { return m_file; }
|
||||
|
||||
void set_file(StringView path);
|
||||
void set_num_channels(int num_channels) { m_num_channels = num_channels; }
|
||||
|
@ -42,7 +45,7 @@ public:
|
|||
|
||||
private:
|
||||
void write_header();
|
||||
RefPtr<Core::File> m_file;
|
||||
RefPtr<Core::DeprecatedFile> m_file;
|
||||
DeprecatedString m_error_string;
|
||||
bool m_finalized { false };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue