mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +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;
|
||||
|
||||
public:
|
||||
~MediaQuery() { }
|
||||
~MediaQuery() = default;
|
||||
|
||||
// https://www.w3.org/TR/mediaqueries-4/#media-types
|
||||
enum class MediaType {
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
String to_string() const;
|
||||
|
||||
private:
|
||||
MediaQuery() { }
|
||||
MediaQuery() = default;
|
||||
|
||||
// https://www.w3.org/TR/mediaqueries-4/#mq-not
|
||||
bool m_negated { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue