Skip to content

Commit

Permalink
move semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
feresr committed May 30, 2020
1 parent dcf035e commit 8eb2f83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/systems/PlayerSystem.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <utility>

#include "ecs/ecs.h"
#include "Components.h"
#include "Constants.h"
Expand All @@ -10,8 +12,8 @@ class PlayerSystem : public System {

std::function<void(void)> gameOverCallback;

Entity* player;
CameraComponent* camera;
Entity* player{};
CameraComponent* camera{};

enum ANIMATION_STATE {
BLINKING,
Expand Down Expand Up @@ -41,5 +43,5 @@ class PlayerSystem : public System {
void eatMushroom(World* world, bool oneup = false);

public:
PlayerSystem(std::function<void(void)> gameOverCallback) : gameOverCallback{gameOverCallback} {}
explicit PlayerSystem(std::function<void(void)> gameOverCallback) : gameOverCallback{std::move(gameOverCallback)} {}
};

0 comments on commit 8eb2f83

Please sign in to comment.