Skip to content

Commit

Permalink
Tidy: Reduce excess padding in the MythMainWindowPrivate structure.
Browse files Browse the repository at this point in the history
The clang-tidy "excessive padding" checker pointed out that the
MythMainWindowPrivate structure contained 38 bytes of padding, where
an optimal ordering of the member variables would produce only 6 bytes
of padding.  Groups a number of the bool variables together to reduce
the padding to the point where the checker doesn't complain anymore.

https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer-optin.performance.Padding.html
  • Loading branch information
linuxdude42 committed Dec 1, 2019
1 parent 0779444 commit 4c12c67
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mythtv/libs/libmythui/mythmainwindow.cpp
Expand Up @@ -192,8 +192,6 @@ class MythMainWindowPrivate
MythPainter *m_painter {nullptr};
MythRender *m_render {nullptr};

bool m_allowInput {true};

QRegion m_repaintRegion;

MythGesture m_gesture;
Expand All @@ -217,14 +215,17 @@ class MythMainWindowPrivate
MythThemeBase *m_themeBase {nullptr};
MythUDPListener *m_udpListener {nullptr};

bool m_pendingUpdate {false};

MythNotificationCenter *m_nc {nullptr};
QTimer *m_idleTimer {nullptr};
int m_idleTime {0};
bool m_standby {false};
bool m_enteringStandby {false};
bool m_disableIdle {false};
MythNotificationCenter *m_nc {nullptr};

bool m_allowInput {true};

bool m_pendingUpdate {false};

// window aspect
bool m_firstinit {true};
bool m_bSavedPOS {false};
Expand Down

0 comments on commit 4c12c67

Please sign in to comment.