From c6380acb33a7414c2abe968a8bd056fae93dd10a Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 31 Jul 2012 17:34:35 +0200 Subject: Removed 'virtual' from methods of Image Maybe it used to be necessary for these methods to be virtual, but this is no longer the case. Hence we can avoid wasting CPU ticks searching through virtual function tables, especially for frequently used methods like getWidth, getHeight and setAlpha. MapLayer::getTile was inlined. --- src/map.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 9736e527..b9bcb284 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -116,11 +116,6 @@ void MapLayer::setTile(int x, int y, Image *img) setTile(x + y * mWidth, img); } -Image* MapLayer::getTile(int x, int y) const -{ - return mTiles[x + y * mWidth]; -} - void MapLayer::draw(Graphics *graphics, int startX, int startY, int endX, int endY, -- cgit v1.2.3-70-g09d2