From 1dbd3c241ea6af43a26449e515438cc241de46ad Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Tue, 5 Jan 2021 01:16:37 -0500 Subject: Pass reference when passing objects! --- helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'helper.cpp') 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 -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 -createPlayer(sf::Texture texture) +createPlayer(sf::Texture& texture) { std::shared_ptr player = std::make_shared(); player->score = 0; -- cgit v1.2.3-54-g00ecf