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++/gameentity.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++/gameentity.cpp')
| -rw-r--r-- | pacman-c++/gameentity.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pacman-c++/gameentity.cpp b/pacman-c++/gameentity.cpp index 9dc72ec..156deda 100644 --- a/pacman-c++/gameentity.cpp +++ b/pacman-c++/gameentity.cpp | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | #include "gameentity.h" | 1 | #include "gameentity.h" |
| 2 | 2 | ||
| 3 | GameEntity::GameEntity(Color::Color color, QGraphicsItem *parent) | 3 | GameEntity::GameEntity(Color::Color color, QGraphicsItem *parent) |
| 4 | : PixmapItem(parent), m_eaten(false), m_color(color) | 4 | : PixmapItem(parent), m_type(Type), m_eaten(false), m_color(color) |
| 5 | {} | 5 | {} |
| 6 | 6 | ||
| 7 | GameEntity::GameEntity(QGraphicsItem *parent) | 7 | GameEntity::GameEntity(QGraphicsItem *parent) |
| 8 | : PixmapItem(parent), m_eaten(false), m_color(Color::none) | 8 | : PixmapItem(parent), m_type(Type), m_eaten(false), m_color(Color::none) |
| 9 | {} | 9 | {} |
