Compare commits
2 Commits
dadbfbc085
...
d21bc60024
| Author | SHA1 | Date | |
|---|---|---|---|
| d21bc60024 | |||
| af05dfcf0d |
@@ -18,7 +18,7 @@ endif()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED
|
||||
"source/Systems/ECS/Component.cpp"
|
||||
"source/Systems/ECS/Components.cpp"
|
||||
"source/Systems/ECS/World.cpp"
|
||||
"source/Systems/Logging.cpp"
|
||||
"source/Systems/Random.cpp"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <queue>
|
||||
#include <stack>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
@@ -53,9 +53,8 @@ public:
|
||||
if (graveyard.empty()) {
|
||||
hashList.push_back(hash);
|
||||
} else {
|
||||
std::size_t tombstone = graveyard.front();
|
||||
hashList[graveyard.top()] = hash;
|
||||
graveyard.pop();
|
||||
hashList[tombstone] = hash;
|
||||
}
|
||||
|
||||
return {hash->firstKey, hash->secondKey, hash->value};
|
||||
@@ -221,7 +220,7 @@ private:
|
||||
|
||||
// It makes more sense to store the individual hash
|
||||
std::vector<DualkeyHash *> hashList;
|
||||
std::queue<std::size_t> graveyard;
|
||||
std::stack<std::size_t> graveyard;
|
||||
};
|
||||
} // namespace Tourmaline::Containers
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user