From 035bbc5bf689839c8d8e7be37f347b0dd900fccf Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 24 Jan 2007 19:50:48 +0000 Subject: Eac one the files in this commit had an instance where a code path is never traversed because of conditionals operating on values that never change. --- (limited to 'noncore/games') diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp index cd298ef..3ed9ea0 100644 --- a/noncore/games/solitaire/canvascard.cpp +++ b/noncore/games/solitaire/canvascard.cpp @@ -214,7 +214,7 @@ void CanvasCard::draw(QPainter &painter) } - if (p != &painter) + if (p != &painter && unscaledCard) { p->end(); QPixmap *scaledCard = CreateScaledPixmap( unscaledCard, scaleX, scaleY ); diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp index 66f4917..504385f 100644 --- a/noncore/games/tetrix/ohighscoredlg.cpp +++ b/noncore/games/tetrix/ohighscoredlg.cpp @@ -174,7 +174,6 @@ void OHighscoreDialog::createHighscoreListView() int pos = 10; int points_ = 0; int level_ = 0; - QListViewItem * Prev = 0; for ( t_playerData * Run = hs_->playerData.first(); Run != 0; @@ -182,14 +181,8 @@ void OHighscoreDialog::createHighscoreListView() { QListViewItem *item; - if( Prev ) { - // after previous - item = new QListViewItem( list, Prev ); - Prev = item; - } else { - item = new QListViewItem( list ); + item = new QListViewItem( list ); - } item->setText( 0 , QString::number( pos ) ); //number item->setText( 1 , Run->sName ); //name if ( Run->points == -1 ) -- cgit v0.9.0.2