mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
Everywhere: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes
This commit is contained in:
parent
2ebd79bc76
commit
0184fc5e43
4 changed files with 14 additions and 22 deletions
|
@ -202,11 +202,9 @@ constexpr double const middle_c = note_frequencies[36];
|
||||||
struct Signal : public Variant<FixedArray<Sample>, RollNotes> {
|
struct Signal : public Variant<FixedArray<Sample>, RollNotes> {
|
||||||
using Variant::Variant;
|
using Variant::Variant;
|
||||||
AK_MAKE_NONCOPYABLE(Signal);
|
AK_MAKE_NONCOPYABLE(Signal);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(Signal);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Signal& operator=(Signal&&) = default;
|
|
||||||
Signal(Signal&&) = default;
|
|
||||||
|
|
||||||
ALWAYS_INLINE SignalType type() const
|
ALWAYS_INLINE SignalType type() const
|
||||||
{
|
{
|
||||||
if (has<FixedArray<Sample>>())
|
if (has<FixedArray<Sample>>())
|
||||||
|
|
|
@ -75,6 +75,9 @@ enum class SQLErrorCode {
|
||||||
};
|
};
|
||||||
|
|
||||||
class [[nodiscard]] Result {
|
class [[nodiscard]] Result {
|
||||||
|
AK_MAKE_NONCOPYABLE(Result);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(Result);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ALWAYS_INLINE Result(SQLCommand command)
|
ALWAYS_INLINE Result(SQLCommand command)
|
||||||
: m_command(command)
|
: m_command(command)
|
||||||
|
@ -100,9 +103,6 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Result(Result&&) = default;
|
|
||||||
Result& operator=(Result&&) = default;
|
|
||||||
|
|
||||||
SQLCommand command() const { return m_command; }
|
SQLCommand command() const { return m_command; }
|
||||||
SQLErrorCode error() const { return m_error; }
|
SQLErrorCode error() const { return m_error; }
|
||||||
DeprecatedString error_string() const;
|
DeprecatedString error_string() const;
|
||||||
|
@ -120,8 +120,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AK_MAKE_NONCOPYABLE(Result);
|
|
||||||
|
|
||||||
SQLCommand m_command { SQLCommand::Unknown };
|
SQLCommand m_command { SQLCommand::Unknown };
|
||||||
|
|
||||||
SQLErrorCode m_error { SQLErrorCode::NoError };
|
SQLErrorCode m_error { SQLErrorCode::NoError };
|
||||||
|
|
|
@ -21,6 +21,7 @@ class HTMLTokenizer;
|
||||||
|
|
||||||
class HTMLToken {
|
class HTMLToken {
|
||||||
AK_MAKE_NONCOPYABLE(HTMLToken);
|
AK_MAKE_NONCOPYABLE(HTMLToken);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(HTMLToken);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class Type : u8 {
|
enum class Type : u8 {
|
||||||
|
@ -95,9 +96,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLToken(HTMLToken&&) = default;
|
|
||||||
HTMLToken& operator=(HTMLToken&&) = default;
|
|
||||||
|
|
||||||
bool is_doctype() const { return m_type == Type::DOCTYPE; }
|
bool is_doctype() const { return m_type == Type::DOCTYPE; }
|
||||||
bool is_start_tag() const { return m_type == Type::StartTag; }
|
bool is_start_tag() const { return m_type == Type::StartTag; }
|
||||||
bool is_end_tag() const { return m_type == Type::EndTag; }
|
bool is_end_tag() const { return m_type == Type::EndTag; }
|
||||||
|
|
|
@ -612,14 +612,7 @@ enum class CycleDecision {
|
||||||
// In most cases, just an input to sed. However, files are also written to when the -i option is used.
|
// In most cases, just an input to sed. However, files are also written to when the -i option is used.
|
||||||
class File {
|
class File {
|
||||||
AK_MAKE_NONCOPYABLE(File);
|
AK_MAKE_NONCOPYABLE(File);
|
||||||
|
AK_MAKE_DEFAULT_MOVABLE(File);
|
||||||
File(LexicalPath input_file_path, NonnullOwnPtr<Core::InputBufferedFile>&& file, OwnPtr<Core::File>&& output, OwnPtr<FileSystem::TempFile>&& temp_file)
|
|
||||||
: m_input_file_path(move(input_file_path))
|
|
||||||
, m_file(move(file))
|
|
||||||
, m_output(move(output))
|
|
||||||
, m_output_temp_file(move(temp_file))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Used for -i mode.
|
// Used for -i mode.
|
||||||
|
@ -656,9 +649,6 @@ public:
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
File(File&&) = default;
|
|
||||||
File& operator=(File&&) = default;
|
|
||||||
|
|
||||||
ErrorOr<bool> has_next() const
|
ErrorOr<bool> has_next() const
|
||||||
{
|
{
|
||||||
return m_file->can_read_line();
|
return m_file->can_read_line();
|
||||||
|
@ -696,6 +686,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
File(LexicalPath input_file_path, NonnullOwnPtr<Core::InputBufferedFile>&& file, OwnPtr<Core::File>&& output, OwnPtr<FileSystem::TempFile>&& temp_file)
|
||||||
|
: m_input_file_path(move(input_file_path))
|
||||||
|
, m_file(move(file))
|
||||||
|
, m_output(move(output))
|
||||||
|
, m_output_temp_file(move(temp_file))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
LexicalPath m_input_file_path;
|
LexicalPath m_input_file_path;
|
||||||
NonnullOwnPtr<Core::InputBufferedFile> m_file;
|
NonnullOwnPtr<Core::InputBufferedFile> m_file;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue