From 6ac4131e7a77263cbd724232e562587da5c4e2c6 Mon Sep 17 00:00:00 2001 From: sverberkt Date: Sun, 15 Mar 2009 17:46:42 +0000 Subject: [PATCH] SVN_SILENT Move ObstacleType within Obstacle. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegames@939779 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ktron/obstacle.cpp | 6 +++--- ktron/obstacle.h | 16 +++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ktron/obstacle.cpp b/ktron/obstacle.cpp index 60ac9305e..e271c0833 100644 --- a/ktron/obstacle.cpp +++ b/ktron/obstacle.cpp @@ -32,20 +32,20 @@ Obstacle::Obstacle() : Object(ObjectType::Obstacle) // Getters / Setters // -void Obstacle::setType(ObstacleType::Type t) +void Obstacle::setType(Obstacle::Type t) { type = t; switch (type) { default: - case ObstacleType::Bush: + case Obstacle::Bush: setSVGName("bush"); break; } } -ObstacleType::Type Obstacle::getType() +Obstacle::Type Obstacle::getType() { return type; } diff --git a/ktron/obstacle.h b/ktron/obstacle.h index ccf51c777..0ebb23ad5 100644 --- a/ktron/obstacle.h +++ b/ktron/obstacle.h @@ -26,24 +26,22 @@ #include "object.h" -namespace ObstacleType { - enum Type { - Bush - }; -} - /** * @short This class represents a player with current position and several flags */ class Obstacle : public Object { public: + enum Type { + Bush + }; + Obstacle(); - ObstacleType::Type getType(); - void setType(ObstacleType::Type t); + Obstacle::Type getType(); + void setType(Obstacle::Type t); private: - ObstacleType::Type type; + Type type; }; #endif // OBSTACLE_H -- 2.11.4.GIT