mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Use default instead of an empty constructor/destructor
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
This commit is contained in:
parent
4fe99ff0d6
commit
a7364eef3c
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/a7364eef3ce Pull-request: https://github.com/SerenityOS/serenity/pull/10053
4 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ namespace GUI {
|
|||
|
||||
class Margins {
|
||||
public:
|
||||
Margins() { }
|
||||
Margins() = default;
|
||||
Margins(int all)
|
||||
: m_top(all)
|
||||
, m_right(all)
|
||||
|
@ -39,7 +39,7 @@ public:
|
|||
, m_left(left)
|
||||
{
|
||||
}
|
||||
~Margins() { }
|
||||
~Margins() = default;
|
||||
|
||||
bool is_null() const { return !m_left && !m_top && !m_right && !m_bottom; }
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class ModelIndex {
|
|||
friend class Model;
|
||||
|
||||
public:
|
||||
ModelIndex() { }
|
||||
ModelIndex() = default;
|
||||
|
||||
bool is_valid() const { return m_model && m_row != -1 && m_column != -1; }
|
||||
int row() const { return m_row; }
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace GUI {
|
|||
|
||||
class Shortcut {
|
||||
public:
|
||||
Shortcut() { }
|
||||
Shortcut() = default;
|
||||
Shortcut(u8 modifiers, KeyCode key)
|
||||
: m_modifiers(modifiers)
|
||||
, m_key(key)
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace GUI {
|
|||
|
||||
class TextPosition {
|
||||
public:
|
||||
TextPosition() { }
|
||||
TextPosition() = default;
|
||||
TextPosition(size_t line, size_t column)
|
||||
: m_line(line)
|
||||
, m_column(column)
|
||||
|
|
Loading…
Reference in a new issue