summaryrefslogtreecommitdiff
path: root/src/misc/binaryheap.hpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-24 10:14:39 +0000
committeralberth <alberth@openttd.org>2010-07-24 10:14:39 +0000
commitbe6c0584240caf420b2475a0be036391e842e8af (patch)
tree6111751cf5526e1eb41176782d84766c4e9ed185 /src/misc/binaryheap.hpp
parent645b6ce77345867fa96861843197481131566c46 (diff)
downloadopenttd-be6c0584240caf420b2475a0be036391e842e8af.tar.xz
(svn r20211) -Codechange: Indented code should have curly braces around it.
Diffstat (limited to 'src/misc/binaryheap.hpp')
-rw-r--r--src/misc/binaryheap.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp
index 65c026ac0..944032cac 100644
--- a/src/misc/binaryheap.hpp
+++ b/src/misc/binaryheap.hpp
@@ -87,8 +87,9 @@ protected:
/* while children are valid */
while (child <= this->items) {
/* choose the smaller child */
- if (child < this->items && *this->data[child + 1] < *this->data[child])
+ if (child < this->items && *this->data[child + 1] < *this->data[child]) {
child++;
+ }
/* is it smaller than our parent? */
if (!(*this->data[child] < *item)) {
/* the smaller child is still bigger or same as parent => we are done */