Deal with initialization defects (especially in ctors).
From: Erik Hovland <erik@hovland.org>
---
mythtv/programs/mythfrontend/mythappearance.cpp | 32 ++++++++------------
.../programs/mythfrontend/programrecpriority.cpp | 20 ++++++-------
2 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/mythtv/programs/mythfrontend/mythappearance.cpp b/mythtv/programs/mythfrontend/mythappearance.cpp
index 8a38d00..3652a47 100644
|
a
|
b
|
using namespace std;
|
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | MythAppearance::MythAppearance(MythScreenStack *parent, const char *name) |
| 26 | | : MythScreenType(parent, name) |
| | 26 | : MythScreenType(parent, name), |
| | 27 | m_x_offset(0), m_y_offset(0), |
| | 28 | m_whicharrow(true), m_coarsefine(false), // fine adjustments by default |
| | 29 | m_changed(false), m_fine(1), // fine moves arrows by one pixel |
| | 30 | m_coarse(10), m_change(m_fine), // coarse moves arrows by ten pixels |
| | 31 | m_topleftarrow_x(0), m_topleftarrow_y(0), |
| | 32 | m_bottomrightarrow_x(0), m_bottomrightarrow_y(0), |
| | 33 | m_arrowsize_x(30), m_arrowsize_y(30), // maybe get the image size later |
| | 34 | m_screenheight(0), m_screenwidth(0), |
| | 35 | m_xsize(GetMythMainWindow()->GetUIScreenRect().width()), |
| | 36 | m_ysize(GetMythMainWindow()->GetUIScreenRect().height()), |
| | 37 | m_menuPopup(NULL) |
| 27 | 38 | { |
| 28 | 39 | // Initialise $stuff |
| 29 | 40 | // Get UI size & offset settings from database |
| 30 | | |
| 31 | | m_coarsefine = false; // fine adjustments by default |
| 32 | | m_fine = 1; //fine moves arrows by one pixel |
| 33 | | m_coarse = 10; // coarse moves arrows by ten pixels |
| 34 | | m_change = m_fine; |
| 35 | | m_screenheight = 0, m_screenwidth = 0; |
| 36 | | m_arrowsize_x = 30; // maybe get the image size later |
| 37 | | m_arrowsize_y = 30; // maybe get the image size later |
| 38 | | m_topleftarrow_x = 0; |
| 39 | | m_topleftarrow_y = 0; |
| 40 | | |
| 41 | | m_menuPopup = NULL; |
| 42 | | m_changed = false; |
| 43 | | |
| 44 | 41 | getSettings(); |
| 45 | 42 | getScreenInfo(); |
| 46 | | m_whicharrow = true; |
| 47 | | |
| 48 | | m_xsize = GetMythMainWindow()->GetUIScreenRect().width(); |
| 49 | | m_ysize = GetMythMainWindow()->GetUIScreenRect().height(); |
| 50 | | |
| 51 | 43 | } |
| 52 | 44 | |
| 53 | 45 | MythAppearance::~MythAppearance() {} |
diff --git a/mythtv/programs/mythfrontend/programrecpriority.cpp b/mythtv/programs/mythfrontend/programrecpriority.cpp
index 5cf780e..9da3ff8 100644
|
a
|
b
|
using namespace std;
|
| 32 | 32 | // overloaded version of ProgramInfo with additional recording priority |
| 33 | 33 | // values so we can keep everything together and don't |
| 34 | 34 | // have to hit the db mulitiple times |
| 35 | | ProgramRecPriorityInfo::ProgramRecPriorityInfo(void) : ProgramInfo() |
| | 35 | ProgramRecPriorityInfo::ProgramRecPriorityInfo(void) |
| | 36 | : ProgramInfo(), |
| | 37 | recTypeRecPriority(0), recType(kNotRecording), |
| | 38 | matchCount(0), recCount(0), |
| | 39 | avg_delay(0), autoRecPriority(0) |
| 36 | 40 | { |
| 37 | | recTypeRecPriority = 0; |
| 38 | | recType = kNotRecording; |
| 39 | | avg_delay = 0; |
| 40 | | autoRecPriority = 0; |
| 41 | 41 | } |
| | 42 | |
| 42 | 43 | ProgramRecPriorityInfo::ProgramRecPriorityInfo(const ProgramRecPriorityInfo &other) |
| 43 | | : ProgramInfo::ProgramInfo(other) |
| | 44 | : ProgramInfo::ProgramInfo(other), |
| | 45 | recTypeRecPriority(other.recTypeRecPriority), recType(other.recType), |
| | 46 | matchCount(other.matchCount), recCount(other.recCount), |
| | 47 | avg_delay(other.avg_delay), autoRecPriority(other.autoRecPriority) |
| 44 | 48 | { |
| 45 | | recTypeRecPriority = other.recTypeRecPriority; |
| 46 | | recType = other.recType; |
| 47 | | avg_delay = other.avg_delay; |
| 48 | | autoRecPriority = other.autoRecPriority; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | ProgramRecPriorityInfo& ProgramRecPriorityInfo::operator=(const ProgramInfo &other) |