diff options
| author | manuel <manuel@mausz.at> | 2011-04-17 19:54:02 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-17 19:54:02 +0200 |
| commit | 19c9c38d28cdaafcc1b496027f53dcd1914037cf (patch) | |
| tree | 416d1efa5ed1dd9fdcea55cb5794fdb25d3bbb87 /pacman-c++/block.cpp | |
| parent | 65195fdab6262d31056c74f922376de3b009943c (diff) | |
| download | foop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.tar.gz foop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.tar.bz2 foop-19c9c38d28cdaafcc1b496027f53dcd1914037cf.zip | |
get rid of two dynamic_casts and use qgraphicitem_cast which is A LOT faster (it makes use of static casts)
Diffstat (limited to 'pacman-c++/block.cpp')
| -rw-r--r-- | pacman-c++/block.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pacman-c++/block.cpp b/pacman-c++/block.cpp index eb51d89..4087662 100644 --- a/pacman-c++/block.cpp +++ b/pacman-c++/block.cpp | |||
| @@ -9,6 +9,8 @@ QMap<Color::Color, QPixmap> Block::m_pixmaps; | |||
| 9 | Block::Block(Color::Color color, unsigned int neighbours, QGraphicsItem *parent) | 9 | Block::Block(Color::Color color, unsigned int neighbours, QGraphicsItem *parent) |
| 10 | : GameEntity(color, parent), m_neighbours(neighbours) | 10 | : GameEntity(color, parent), m_neighbours(neighbours) |
| 11 | { | 11 | { |
| 12 | m_type = Type; | ||
| 13 | |||
| 12 | /* empty object for servers */ | 14 | /* empty object for servers */ |
| 13 | if (Constants::server) | 15 | if (Constants::server) |
| 14 | return; | 16 | return; |
