From f51ddfac7b8948a43a40894185238c8a1ceeb5c4 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 15 Nov 2024 17:25:12 +0100 Subject: wrap lines at column 95 instead of 80 --- src/crepe/ComponentManager.hpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/crepe/ComponentManager.hpp') diff --git a/src/crepe/ComponentManager.hpp b/src/crepe/ComponentManager.hpp index 98efb49..c537b03 100644 --- a/src/crepe/ComponentManager.hpp +++ b/src/crepe/ComponentManager.hpp @@ -61,8 +61,7 @@ void ComponentManager::delete_components_by_id(game_object_id_t id) { // Find the type (in the unordered_map<>) if (this->components.find(type) != this->components.end()) { // Get the correct vector<> - vector>> & component_array - = this->components[type]; + vector>> & component_array = this->components[type]; // Make sure that the id (that we are looking for) is within the boundaries of the vector<> if (id < component_array.size()) { @@ -93,12 +92,10 @@ ComponentManager::get_components_by_id(game_object_id_t id) const { // Create an empty vector<> vector> component_vector; - if (this->components.find(type) == this->components.end()) - return component_vector; + if (this->components.find(type) == this->components.end()) return component_vector; // Get the correct vector<> - const vector>> & component_array - = this->components.at(type); + const vector>> & component_array = this->components.at(type); // Make sure that the id (that we are looking for) is within the boundaries of the vector<> if (id >= component_array.size()) return component_vector; @@ -118,8 +115,7 @@ ComponentManager::get_components_by_id(game_object_id_t id) const { } template -std::vector> -ComponentManager::get_components_by_type() const { +std::vector> ComponentManager::get_components_by_type() const { using namespace std; // Determine the type of T (this is used as the key of the unordered_map<>) @@ -129,12 +125,10 @@ ComponentManager::get_components_by_type() const { vector> component_vector; // Find the type (in the unordered_map<>) - if (this->components.find(type) == this->components.end()) - return component_vector; + if (this->components.find(type) == this->components.end()) return component_vector; // Get the correct vector<> - const vector>> & component_array - = this->components.at(type); + const vector>> & component_array = this->components.at(type); // Loop through the whole vector<> for (const vector> & component : component_array) { -- cgit v1.2.3