Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriiKoniushenko committed Jul 29, 2023
1 parent 1f55ab4 commit d9846d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions game/source/VaKon2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void VaKon2D::start()

text.draw(shaderPack);

getUpdateableCollector().updateAll();
GetUpdateableCollector().updateAll();
GetWorld().update();
GetWindow().swapBuffers();
GetWindow().pollEvent();
Expand All @@ -86,9 +86,5 @@ void VaKon2D::start()

void VaKon2D::initCore()
{
Initer::init({
.glfwVersion = {3, 3},
.windowSize = {800, 600},
.title = "My game"}
);
Initer::init({.glfwVersion = {3, 3}, .windowSize = {800, 600}, .title = "My game"});
}
2 changes: 1 addition & 1 deletion lib/core/core-wrappers/include/UpdateableCollector.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ class UpdateableCollector : public Singleton<UpdateableCollector>
std::vector<Updateable*> data_;
};

UpdateableCollector& getUpdateableCollector();
UpdateableCollector& GetUpdateableCollector();
4 changes: 2 additions & 2 deletions lib/core/core-wrappers/source/Updateable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

Updateable::Updateable()
{
getUpdateableCollector().add(this);
GetUpdateableCollector().add(this);
}

Updateable::~Updateable()
{
getUpdateableCollector().remove(this);
GetUpdateableCollector().remove(this);
}
2 changes: 1 addition & 1 deletion lib/core/core-wrappers/source/UpdateableCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void UpdateableCollector::updateAll()
}
}

UpdateableCollector& getUpdateableCollector()
UpdateableCollector& GetUpdateableCollector()
{
return UpdateableCollector::instance();
}

0 comments on commit d9846d1

Please sign in to comment.