1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +01:00

add missing override

This commit is contained in:
Aldoxtor 2017-05-03 09:54:21 +02:00 committed by Daniel Evans
parent fd5acc2be2
commit 7a8c602c75
14 changed files with 58 additions and 58 deletions

View File

@ -143,7 +143,7 @@ public:
#define DECL_ACTIVITY(activity_name) \
static constexpr auto ActivityName = #activity_name; \
std::string name() const { \
std::string name() const override { \
return ActivityName; \
}
@ -165,9 +165,9 @@ struct GoTo : public CharacterController::Activity {
: target(target), sprint(_sprint) {
}
bool update(CharacterObject* character, CharacterController* controller);
bool update(CharacterObject* character, CharacterController* controller) override;
bool canSkip(CharacterObject*, CharacterController*) const {
bool canSkip(CharacterObject*, CharacterController*) const override {
return true;
}
};
@ -180,7 +180,7 @@ struct Jump : public CharacterController::Activity {
Jump() : jumped(false) {
}
bool update(CharacterObject* character, CharacterController* controller);
bool update(CharacterObject* character, CharacterController* controller) override;
};
struct EnterVehicle : public CharacterController::Activity {
@ -202,7 +202,7 @@ struct EnterVehicle : public CharacterController::Activity {
bool canSkip(CharacterObject* character,
CharacterController*) const override;
bool update(CharacterObject* character, CharacterController* controller);
bool update(CharacterObject* character, CharacterController* controller) override;
};
struct ExitVehicle : public CharacterController::Activity {
@ -213,7 +213,7 @@ struct ExitVehicle : public CharacterController::Activity {
ExitVehicle(bool jacked_ = false) : jacked(jacked_) {
}
bool update(CharacterObject* character, CharacterController* controller);
bool update(CharacterObject* character, CharacterController* controller) override;
};
struct UseItem : public CharacterController::Activity {
@ -226,7 +226,7 @@ struct UseItem : public CharacterController::Activity {
UseItem(int slot) : itemslot(slot) {
}
bool update(CharacterObject* character, CharacterController* controller);
bool update(CharacterObject* character, CharacterController* controller) override;
};
}

View File

@ -86,11 +86,11 @@ public:
~CharacterObject();
Type type() {
Type type() const override {
return Character;
}
void tick(float dt);
void tick(float dt) override;
const CharacterState& getCurrentState() const {
return currentState;
@ -111,7 +111,7 @@ public:
*/
void updateCharacter(float dt);
virtual void setPosition(const glm::vec3& pos);
virtual void setPosition(const glm::vec3& pos) override;
bool isPlayer() const;

View File

@ -16,11 +16,11 @@ public:
BaseModelInfo* modelinfo);
~CutsceneObject();
Type type() {
Type type() const override {
return Cutscene;
}
void tick(float dt);
void tick(float dt) override;
void setParentActor(GameObject* parent, ModelFrame* bone);

View File

@ -130,7 +130,7 @@ public:
* @brief determines what type of object this is.
* @return one of Type
*/
virtual Type type() {
virtual Type type() const {
return Unknown;
}
@ -183,7 +183,7 @@ public:
float impulse;
};
virtual bool takeDamage(const DamageInfo& /*damage*/) {
virtual bool takeDamage(const DamageInfo& damage) {
return false;
}

View File

@ -31,7 +31,7 @@ public:
std::shared_ptr<DynamicObjectData> dyn);
~InstanceObject();
Type type() {
Type type() const override {
return Instance;
}
@ -39,14 +39,14 @@ public:
return atomic_;
}
void tick(float dt);
void tick(float dt) override;
void changeModel(BaseModelInfo* incoming);
virtual void setPosition(const glm::vec3& pos);
virtual void setRotation(const glm::quat& r);
virtual void setPosition(const glm::vec3& pos) override;
virtual void setRotation(const glm::quat& r) override;
virtual bool takeDamage(const DamageInfo& damage);
virtual bool takeDamage(const DamageInfo& damage) override;
void setSolid(bool solid);

View File

@ -42,11 +42,11 @@ public:
~PickupObject();
Type type() {
Type type() const override {
return Pickup;
}
void tick(float dt);
void tick(float dt) override;
virtual bool onCharacterTouch(CharacterObject* character) {
RW_UNUSED(character);

View File

@ -53,9 +53,9 @@ public:
~ProjectileObject();
void tick(float dt);
void tick(float dt) override;
Type type() {
Type type() const override {
return Projectile;
}

View File

@ -58,9 +58,9 @@ public:
virtual ~VehicleObject();
void setPosition(const glm::vec3& pos);
void setPosition(const glm::vec3& pos) override;
void setRotation(const glm::quat& orientation);
void setRotation(const glm::quat& orientation) override;
void updateTransform(const glm::vec3& pos, const glm::quat& rot) override;
@ -71,7 +71,7 @@ public:
Atomic* getHighLOD() const { return chassishigh_; }
Atomic* getLowLOD() const { return chassislow_; }
Type type() {
Type type() const override {
return Vehicle;
}
@ -91,7 +91,7 @@ public:
bool getHandbraking() const;
void tick(float dt);
void tick(float dt) override;
void tickPhysics(float dt);
@ -130,7 +130,7 @@ public:
Part* getSeatEntryDoor(size_t seat);
virtual bool takeDamage(const DamageInfo& damage);
virtual bool takeDamage(const DamageInfo& damage) override;
enum FrameState { OK, DAM, BROKEN };

View File

@ -22,13 +22,13 @@ class BenchmarkState : public State {
public:
BenchmarkState(RWGame* game, const std::string& benchfile);
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void draw(GameRenderer* r);
virtual void tick(float dt) override;
virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
const ViewCamera& getCamera();
};

View File

@ -21,13 +21,13 @@ public:
DebugState(RWGame* game, const glm::vec3& vp = {},
const glm::quat& vd = {});
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void draw(GameRenderer* r);
virtual void tick(float dt) override;
virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
void printCameraDetails();

View File

@ -46,16 +46,16 @@ public:
void startTest();
void startGame();
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void tick(float dt) override;
virtual void draw(GameRenderer* r);
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
virtual void handlePlayerInput(const SDL_Event& event);
virtual bool shouldWorldUpdate();
virtual bool shouldWorldUpdate() override;
const ViewCamera& getCamera(float alpha);
private:

View File

@ -10,16 +10,16 @@ class LoadingState : public State {
public:
LoadingState(RWGame* game, std::function<void(void)> callback);
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void tick(float dt) override;
virtual void draw(GameRenderer* r);
virtual void draw(GameRenderer* r) override;
virtual bool shouldWorldUpdate();
virtual bool shouldWorldUpdate() override;
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
};
#endif // LOADINGSTATE_HPP

View File

@ -7,15 +7,15 @@ class MenuState : public State {
public:
MenuState(RWGame* game);
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void tick(float dt) override;
virtual void enterMainMenu();
virtual void enterLoadMenu();
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
};
#endif // MENUSTATE_HPP

View File

@ -7,14 +7,14 @@ class PauseState : public State {
public:
PauseState(RWGame* game);
virtual void enter();
virtual void exit();
virtual void enter() override;
virtual void exit() override;
virtual void tick(float dt);
virtual void tick(float dt) override;
virtual void draw(GameRenderer* r);
virtual void draw(GameRenderer* r) override;
virtual void handleEvent(const SDL_Event& event);
virtual void handleEvent(const SDL_Event& event) override;
};
#endif // PAUSESTATE_HPP