author | simon <simon> | 2002-04-30 14:37:40 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 14:37:40 (UTC) |
commit | c63b1853bb26bcd5ae21b73eb21d858a56534914 (patch) (side-by-side diff) | |
tree | 9a0e5351252a80292cf5af0131487ac1742a335d | |
parent | 85b6723c707949f5689bfca6f442d9cbb73f2ee9 (diff) | |
download | opie-c63b1853bb26bcd5ae21b73eb21d858a56534914.zip opie-c63b1853bb26bcd5ae21b73eb21d858a56534914.tar.gz opie-c63b1853bb26bcd5ae21b73eb21d858a56534914.tar.bz2 |
- no default args in method impls
- resolved parameter shadowing
-rw-r--r-- | noncore/games/mindbreaker/mindbreaker.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp index b0e4d88..1a1d05d 100644 --- a/noncore/games/mindbreaker/mindbreaker.cpp +++ b/noncore/games/mindbreaker/mindbreaker.cpp @@ -128,17 +128,17 @@ QImage Peg::imageForType(int t) return *specialPegs[t]; } else { return *normalPegs[rand() % 6]; } } return *normalPegs[t]; } -Peg::Peg(QCanvas *canvas , int t, int g = -1, int p = -1) +Peg::Peg(QCanvas *canvas , int t, int g, int p) : QCanvasRectangle(canvas) { setSize(normalPegs[t]->width(), normalPegs[t]->height() ); pegtype = t; isplaced = FALSE; peg_pos = p; peg_go = g; aniStep = rand() % 6; @@ -200,17 +200,17 @@ inline void Peg::setPlaced(bool p) inline int Peg::type() const { return pegtype; } /* Load the main image, copy from it the pegs, the board, and the answer image * and use these to create the tray, answer and board */ -MindBreaker::MindBreaker( QWidget *parent=0, const char *name=0, int wFlags=0 ) +MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags ) : QMainWindow(parent, name, wFlags), canvas(board_height, board_width) { MindBreakerBoard *m = new MindBreakerBoard(canvas, this); setCentralWidget(m); setToolBarsMovable( FALSE ); @@ -245,19 +245,19 @@ void MindBreaker::setScore(int turns, int games) average = total_turns / total_games; else average = 0.0; score->setText(tr("win avg: %1 turns (%2 games)").arg(average).arg(games)); } -MindBreakerBoard::MindBreakerBoard( QCanvas &c, QWidget *parent=0, - const char *name=0, int wFlags=0 ) - : QCanvasView(&c, parent, name, wFlags) +MindBreakerBoard::MindBreakerBoard( QCanvas &canv, QWidget *parent, + const char *name, int wFlags ) + : QCanvasView(&canv, parent, name, wFlags) { int i, x, y; struct timeval tv; current_go = 0; gettimeofday(&tv, 0); srand(tv.tv_usec); |