Initial changes to clean up the code.
This commit is contained in:
parent
8d3ccd935d
commit
f3f875ee80
8 changed files with 21 additions and 29 deletions
|
@ -52,7 +52,7 @@ namespace DinkyECS {
|
|||
|
||||
template <typename Comp>
|
||||
void set_the(Comp val) {
|
||||
$facts[std::type_index(typeid(Comp))] = val;
|
||||
$facts.insert_or_assign(std::type_index(typeid(Comp)), val);
|
||||
}
|
||||
|
||||
template <typename Comp>
|
||||
|
@ -68,7 +68,7 @@ namespace DinkyECS {
|
|||
template <typename Comp>
|
||||
void set(Entity ent, Comp val) {
|
||||
EntityMap &map = entity_map_for<Comp>();
|
||||
map[ent] = val;
|
||||
map.insert_or_assign(ent, val);
|
||||
}
|
||||
|
||||
template <typename Comp>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue