diff options
| author | aleksav013 <aleksav013@gmail.com> | 2021-06-07 16:51:43 +0200 |
|---|---|---|
| committer | aleksav013 <aleksav013@gmail.com> | 2021-06-07 16:51:43 +0200 |
| commit | c01f67b284db9c987680d121c11df2d9da56e2d0 (patch) | |
| tree | 30ac2b4959b98844f0be11283ea63ffec4c30834 /src/includes/State.hpp | |
| parent | 2258ca5c7e6166d33c34ce647e656bc335a6acb9 (diff) | |
Smart pointers
Diffstat (limited to 'src/includes/State.hpp')
| -rw-r--r-- | src/includes/State.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/includes/State.hpp b/src/includes/State.hpp index c9dffb9..5623bbf 100644 --- a/src/includes/State.hpp +++ b/src/includes/State.hpp @@ -2,15 +2,16 @@ #define STATE_H #include<SFML/Graphics.hpp> +#include<memory> class State { private: - sf::RenderWindow *prozor; + std::shared_ptr<sf::RenderWindow> prozor; int visina,sirina; bool ischanged=0,newgame=0,pause=0,kraj=0; - std::map<std::string,sf::Font*> font; - std::map<std::string,sf::Texture*> tex; + std::map<std::string,std::shared_ptr<sf::Font>> font; + std::map<std::string,std::shared_ptr<sf::Texture>> tex; sf::RectangleShape podloga; sf::Text pausetext,krajtext; @@ -23,7 +24,6 @@ class State void keyboard(); public: State(); - ~State(); void loop(); }; |
