aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/GameObject.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-21 20:35:09 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-21 20:35:09 +0100
commitad0dcad1f11d698abf71bf69fb0927c26298d253 (patch)
tree3e8a501a84682ca2b6c085a987666c9b777bc1c7 /src/crepe/api/GameObject.cpp
parentbdc81e355e5bee5d2a3e29346ba08f7bc55196ca (diff)
parent115d6f50152dc018073345800ca90b85846ebaa9 (diff)
Merge branch 'master' into niels/decoupling_pixel_and_pos
Diffstat (limited to 'src/crepe/api/GameObject.cpp')
-rw-r--r--src/crepe/api/GameObject.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/crepe/api/GameObject.cpp b/src/crepe/api/GameObject.cpp
index 287e81d..4874426 100644
--- a/src/crepe/api/GameObject.cpp
+++ b/src/crepe/api/GameObject.cpp
@@ -23,12 +23,10 @@ void GameObject::set_parent(const GameObject & parent) {
ComponentManager & mgr = this->component_manager;
// Set parent on own Metadata component
- vector<reference_wrapper<Metadata>> this_metadata
- = mgr.get_components_by_id<Metadata>(this->id);
+ RefVector<Metadata> this_metadata = mgr.get_components_by_id<Metadata>(this->id);
this_metadata.at(0).get().parent = parent.id;
// Add own id to children list of parent's Metadata component
- vector<reference_wrapper<Metadata>> parent_metadata
- = mgr.get_components_by_id<Metadata>(parent.id);
+ RefVector<Metadata> parent_metadata = mgr.get_components_by_id<Metadata>(parent.id);
parent_metadata.at(0).get().children.push_back(this->id);
}