Skip to content
Permalink
Browse files

MythMusic: refactor RatingSettings::Create()

Fixes Coverity ID's 1026712, 1026715, 1026716, 1026717,1026718
  • Loading branch information
Paul Harrison
Paul Harrison committed Jun 3, 2013
1 parent 08b82b1 commit b95116f12a7059a0a53e4bc85faf7b60678fe09c
Showing with 8 additions and 8 deletions.
  1. +8 −8 mythplugins/mythmusic/mythmusic/ratingsettings.cpp
@@ -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)
{

0 comments on commit b95116f

Please sign in to comment.
You can’t perform that action at this time.