Initial changes to clean up the code.

This commit is contained in:
Zed A. Shaw 2025-01-10 11:12:14 -05:00
parent 8d3ccd935d
commit f3f875ee80
8 changed files with 21 additions and 29 deletions

View file

@ -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>