Skip to content

Commit

Permalink
MythMusic: refactor RatingSettings::Create()
Browse files Browse the repository at this point in the history
Fixes Coverity ID's 1026712, 1026715, 1026716, 1026717,1026718
  • Loading branch information
Paul Harrison committed Jun 3, 2013
1 parent 08b82b1 commit b95116f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mythplugins/mythmusic/mythmusic/ratingsettings.cpp
Expand Up @@ -21,18 +21,18 @@ RatingSettings::~RatingSettings()

bool RatingSettings::Create()
{
bool err = false;

// Load the theme for this screen
if (!LoadWindowFromXML("musicsettings-ui.xml", "ratingsettings", this))
return false;

m_ratingWeight = dynamic_cast<MythUISpinBox *> (GetChild("ratingweight"));
m_playCountWeight = dynamic_cast<MythUISpinBox *> (GetChild("playcountweight"));
m_lastPlayWeight = dynamic_cast<MythUISpinBox *> (GetChild("lastplayweight"));
m_randomWeight = dynamic_cast<MythUISpinBox *> (GetChild("randomweight"));
m_saveButton = dynamic_cast<MythUIButton *> (GetChild("save"));
m_cancelButton = dynamic_cast<MythUIButton *> (GetChild("cancel"));
bool err = false;

UIUtilE::Assign(this, m_ratingWeight, "ratingweight", &err);
UIUtilE::Assign(this, m_playCountWeight, "playcountweight", &err);
UIUtilE::Assign(this, m_lastPlayWeight, "lastplayweight", &err);
UIUtilE::Assign(this, m_randomWeight, "randomweight", &err);
UIUtilE::Assign(this, m_saveButton, "save", &err);
UIUtilE::Assign(this, m_cancelButton, "cancel", &err);

if (err)
{
Expand Down

0 comments on commit b95116f

Please sign in to comment.