mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibWeb: Use "= default" to declare empty constructors and descructors
A types which have special functions declared with "= default can be trivially copied. Besides being good practice, the compiler might be able generate copy and initialize code in a more optimized way. Found By PVS-Studio: https://pvs-studio.com/en/docs/warnings/v832/
This commit is contained in:
parent
027cbe6b89
commit
6781d60e3a
2 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ class MediaQuery : public RefCounted<MediaQuery> {
|
||||||
friend class Parser;
|
friend class Parser;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~MediaQuery() { }
|
~MediaQuery() = default;
|
||||||
|
|
||||||
// https://www.w3.org/TR/mediaqueries-4/#media-types
|
// https://www.w3.org/TR/mediaqueries-4/#media-types
|
||||||
enum class MediaType {
|
enum class MediaType {
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
String to_string() const;
|
String to_string() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MediaQuery() { }
|
MediaQuery() = default;
|
||||||
|
|
||||||
// https://www.w3.org/TR/mediaqueries-4/#mq-not
|
// https://www.w3.org/TR/mediaqueries-4/#mq-not
|
||||||
bool m_negated { false };
|
bool m_negated { false };
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
, m_handler(move(handler))
|
, m_handler(move(handler))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
~RequestAnimationFrameCallback() { }
|
~RequestAnimationFrameCallback() = default;
|
||||||
|
|
||||||
i32 id() const { return m_id; }
|
i32 id() const { return m_id; }
|
||||||
bool is_cancelled() const { return !m_handler; }
|
bool is_cancelled() const { return !m_handler; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue