diff options
author | Piotr HaĆaczkiewicz <piotr.halaczkiewicz@gmail.com> | 2013-07-22 22:50:45 +0200 |
---|---|---|
committer | Piotr HaĆaczkiewicz <piotr.halaczkiewicz@gmail.com> | 2013-07-22 22:50:45 +0200 |
commit | c0c254f14d0d65a8b7ec50720ed8d98b5a04919a (patch) | |
tree | 0fc26c057880491c12358a6cc9d0f37d15155dc3 /src/map/pet.c | |
parent | 0b63deefd251a06b50a333facd6ad0e099e942b2 (diff) | |
download | hercules-c0c254f14d0d65a8b7ec50720ed8d98b5a04919a.tar.gz hercules-c0c254f14d0d65a8b7ec50720ed8d98b5a04919a.tar.bz2 hercules-c0c254f14d0d65a8b7ec50720ed8d98b5a04919a.tar.xz hercules-c0c254f14d0d65a8b7ec50720ed8d98b5a04919a.zip |
Binary heap fix & improvement.
Fixed a bug when removing last element of binary heap (its parent would
be removed instead if it had the same value).
Binary heap now allows custom swapper function/macro. Added `swap_ptr`
macro to swap two pointers in place (`swap` is not suitable for
pointers). This allows to store pointers in binary heap.
Diffstat (limited to 'src/map/pet.c')
0 files changed, 0 insertions, 0 deletions