diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-31 17:34:35 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-31 17:56:17 +0200 |
commit | c6380acb33a7414c2abe968a8bd056fae93dd10a (patch) | |
tree | e3237080c15d7a3b4607ab9a770dce4a0c283fb8 /src/map.h | |
parent | 7a178f6d257a2241d3400271d20eb2b902fdab37 (diff) | |
download | mana-c6380acb33a7414c2abe968a8bd056fae93dd10a.tar.gz mana-c6380acb33a7414c2abe968a8bd056fae93dd10a.tar.bz2 mana-c6380acb33a7414c2abe968a8bd056fae93dd10a.tar.xz mana-c6380acb33a7414c2abe968a8bd056fae93dd10a.zip |
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.
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -108,7 +108,8 @@ class MapLayer /** * Get tile image, with x and y in layer coordinates. */ - Image *getTile(int x, int y) const; + Image *getTile(int x, int y) const + { return mTiles[x + y * mWidth]; } /** * Draws this layer to the given graphics context. The coordinates are |