From b191a68ca2b1ec370fc1faafb078e4e201b2b459 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 6 Feb 2008 05:02:11 +0000 Subject: [ADD] Tilemap editing to the Map form [ADD] MapUI.{h, cpp}, TilemapModel.{h, cpp}, TileDelegate.{h, cpp} [FIX] Editing area of the main window now has scroll bars [FIX] CoinListUI is now safer with its combobox creation for the values [FIX] Minor fixes in Tile and Map classes [FIX] Matrix cleaned up git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@57 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- general/Matrix.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'general') diff --git a/general/Matrix.h b/general/Matrix.h index c0d622bd..aa495692 100644 --- a/general/Matrix.h +++ b/general/Matrix.h @@ -136,8 +136,7 @@ template class Matrix { if ((height <= row) || (width <= col)) throw("Matrix: dimension out-of-bounds"); - matrix(row, col) = s; - return true; + (*this)(row, col) = s; } void resize(const int h, const int w, const T& d = T()) { @@ -194,9 +193,9 @@ template class Matrix height = rhs.getHeight(); width = rhs.getWidth(); resize(height, width); - for (unsigned i = 0; i < height; ++i) + for (int i = 0; i < height; ++i) { - for (unsigned j = 0; j < width; ++j) + for (int j = 0; j < width; ++j) matrix[i][j] = rhs(i, j); } return *this; -- cgit