diff --git a/headers/Containers/DualkeyMap.hpp b/headers/Containers/DualkeyMap.hpp index 0e82cd0..71fd396 100644 --- a/headers/Containers/DualkeyMap.hpp +++ b/headers/Containers/DualkeyMap.hpp @@ -175,8 +175,22 @@ public: return finishedQuery; } - void - scan(std::function scanFunction) { + void scan(std::function + scanFunction) { + for (DualkeyHash *hash : hashList) { + if (hash == nullptr) { + continue; + } + if (scanFunction(hash->firstKeyHash, hash->secondKeyHash, hash->value)) { + return; + } + } + } + + void scan(std::function + scanFunction) { for (DualkeyHash *hash : hashList) { if (hash == nullptr) { continue;