Minor tweaks on the general codebase
This commit is contained in:
@@ -49,7 +49,6 @@ public:
|
|||||||
// Components
|
// Components
|
||||||
template <Component T, typename... Args>
|
template <Component T, typename... Args>
|
||||||
T &AddComponent(const Entity &entity, Args &&...constructionArguments) {
|
T &AddComponent(const Entity &entity, Args &&...constructionArguments) {
|
||||||
// Insert to entity list
|
|
||||||
auto entityIter = GetEntityIterator(
|
auto entityIter = GetEntityIterator(
|
||||||
entity,
|
entity,
|
||||||
std::format(
|
std::format(
|
||||||
|
|||||||
@@ -41,10 +41,8 @@ namespace std {
|
|||||||
template <> struct hash<Tourmaline::Type::UUID> {
|
template <> struct hash<Tourmaline::Type::UUID> {
|
||||||
size_t operator()(const Tourmaline::Type::UUID &uuid) const noexcept {
|
size_t operator()(const Tourmaline::Type::UUID &uuid) const noexcept {
|
||||||
const auto data = uuid.data.get();
|
const auto data = uuid.data.get();
|
||||||
size_t h1 = std::hash<uint64_t>{}(data[0]);
|
size_t h1 = std::hash<uint64_t>{}(data[0]),
|
||||||
size_t h2 = std::hash<uint64_t>{}(data[1]);
|
h2 = std::hash<uint64_t>{}(data[1]);
|
||||||
|
|
||||||
// Combine the two hashes
|
|
||||||
return h1 ^ (h2 << 1);
|
return h1 ^ (h2 << 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user