Changing casing of dualkey map to PascalCase

This commit is contained in:
2026-02-01 00:54:25 +02:00
parent 2f84b47fec
commit f2d429109b
3 changed files with 13 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ public:
}
}
Entry insert(AKey firstKey, BKey secondKey, Value value) {
Entry Insert(AKey firstKey, BKey secondKey, Value value) {
DualkeyHash *hash = new DualkeyHash(std::move(firstKey),
std::move(secondKey), std::move(value));
@@ -57,7 +57,7 @@ public:
return {hash->firstKey, hash->secondKey, hash->value};
}
std::size_t remove(std::optional<AKey> firstKey,
std::size_t Remove(std::optional<AKey> firstKey,
std::optional<BKey> secondKey) {
bool isFirstKeyGiven = firstKey.has_value();
bool isSecondKeyGiven = secondKey.has_value();
@@ -120,7 +120,7 @@ public:
}
[[nodiscard("Discarding an expensive query!")]]
std::vector<QueryResult> query(std::optional<AKey> firstKey,
std::vector<QueryResult> Query(std::optional<AKey> firstKey,
std::optional<BKey> secondKey) {
bool isFirstKeyGiven = firstKey.has_value();
bool isSecondKeyGiven = secondKey.has_value();
@@ -175,7 +175,7 @@ public:
return finishedQuery;
}
void scan(std::function<bool(const std::size_t firstKeyHash,
void Scan(std::function<bool(const std::size_t firstKeyHash,
const std::size_t secondKeyHash, Value &value)>
scanFunction) {
for (DualkeyHash *hash : hashList) {
@@ -188,7 +188,7 @@ public:
}
}
void scan(std::function<bool(const AKey &firstKey, const BKey &secondKey,
void Scan(std::function<bool(const AKey &firstKey, const BKey &secondKey,
Value &value)>
scanFunction) {
for (DualkeyHash *hash : hashList) {
@@ -202,7 +202,7 @@ public:
}
[[nodiscard]]
std::size_t count() {
std::size_t Count() {
return hashList.size() - graveyard.size();
}

View File

@@ -39,7 +39,7 @@ public:
template <isAComponent component, typename... Args>
component &AddComponent(const Entity &entity,
Args &&...constructionArguments) {
auto newComponent = entityComponentMap.insert(
auto newComponent = entityComponentMap.Insert(
entity, typeid(component), component(constructionArguments...));
return std::any_cast<component &>(std::get<2>(newComponent));
@@ -48,7 +48,7 @@ public:
template <isAComponent component>
[[nodiscard("Discarding an expensive operation's result!")]]
component &GetComponent(const Entity &entity) {
auto result = entityComponentMap.query(entity, typeid(component));
auto result = entityComponentMap.Query(entity, typeid(component));
if (result.empty()) {
Logging::Log(std::format("Entity {} does not have component {}!",
entity.asString(), typeid(component).name()),
@@ -60,14 +60,14 @@ public:
template <isAComponent component>
[[nodiscard("Discarding an expensive operation's result!")]]
bool HasComponent(const Entity &entity) {
return entityComponentMap.query(entity, typeid(component)).size();
return entityComponentMap.Query(entity, typeid(component)).size();
}
template <isAComponent component>
[[nodiscard("It is not guaranteed that a component can always be removed, "
"please make sure by checking the returned bool")]]
bool RemoveComponent(const Entity &entity) {
return entityComponentMap.remove(entity, typeid(component));
return entityComponentMap.Remove(entity, typeid(component));
}
// Copying is not allowed since the ECS world is meant to be