projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55e283c
)
Simplify erase_one slightly. It's not necessary to preserve
author
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 21:46:21 +0000
(21:46 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 23 Jun 2008 21:46:21 +0000
(21:46 +0000)
the value of the element to be erased while the heap is
being updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52646
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/PriorityQueue.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/PriorityQueue.h
b/include/llvm/ADT/PriorityQueue.h
index 1cff0f2a0ceeaf0ca062a8e6209e18cb944c72bd..2503f75e81a265b279a1e0ed6d54ffb3c9b6295d 100644
(file)
--- a/
include/llvm/ADT/PriorityQueue.h
+++ b/
include/llvm/ADT/PriorityQueue.h
@@
-51,7
+51,7
@@
public:
// Logarithmic-time heap bubble-up.
while (i != 0) {
typename Sequence::size_type parent = (i - 1) / 2;
-
std::swap(this->c[i], this->c[parent])
;
+
this->c[i] = this->c[parent]
;
i = parent;
}