diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-19 01:07:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-19 01:18:22 +0300 |
commit | a30c9f710a64d0adca1597c0d0404713a26a401e (patch) | |
tree | 40fc7724b8a362dc08745ad766e6ee7e025479db /source/blender/blenlib/intern/BLI_heap.c | |
parent | 642b77e874e787b04e28dc68af3ac4bd7aed5b2e (diff) |
Partial revert '#if 0' cleanup
Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e
Some of this code had comments to be left as is for readability,
or comment the code should be kept.
Other functions were only for debugging.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_heap.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_heap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c index 97605640be4..5658c1fd103 100644 --- a/source/blender/blenlib/intern/BLI_heap.c +++ b/source/blender/blenlib/intern/BLI_heap.c @@ -87,6 +87,11 @@ struct Heap { BLI_INLINE void heap_swap(Heap *heap, const uint i, const uint j) { + +#if 0 + SWAP(uint, heap->tree[i]->index, heap->tree[j]->index); + SWAP(HeapNode *, heap->tree[i], heap->tree[j]); +#else HeapNode **tree = heap->tree; union { uint index; @@ -94,6 +99,7 @@ BLI_INLINE void heap_swap(Heap *heap, const uint i, const uint j) } tmp; SWAP_TVAL(tmp.index, tree[i]->index, tree[j]->index); SWAP_TVAL(tmp.node, tree[i], tree[j]); +#endif } static void heap_down(Heap *heap, uint i) |