summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helper.cpp4
-rw-r--r--helper.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/helper.cpp b/helper.cpp
index 97a60a6..8c68a28 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -39,7 +39,7 @@ sf::Font loadFont()
}
std::shared_ptr<struct piece_t>
-createPiece(int id, sf::Texture texture)
+createPiece(int id, sf::Texture& texture)
{
sf::Sprite s(texture);
@@ -51,7 +51,7 @@ createPiece(int id, sf::Texture texture)
}
std::shared_ptr<struct player_t>
-createPlayer(sf::Texture texture)
+createPlayer(sf::Texture& texture)
{
std::shared_ptr<struct player_t> player = std::make_shared<struct player_t>();
player->score = 0;
diff --git a/helper.h b/helper.h
index 69b37ad..8626e23 100644
--- a/helper.h
+++ b/helper.h
@@ -35,10 +35,10 @@ loadTextures(const char* path);
sf::Font loadFont();
std::shared_ptr<struct player_t>
-createPlayer(sf::Texture pieceTexture);
+createPlayer(sf::Texture& pieceTexture);
std::shared_ptr<struct piece_t>
-createPiece(int id, sf::Texture texture);
+createPiece(int id, sf::Texture& texture);
bool
clickedPiece(sf::Vector2i mousePosition, std::shared_ptr<struct piece_t> piece);