diff options
author | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
commit | be6c0584240caf420b2475a0be036391e842e8af (patch) | |
tree | 6111751cf5526e1eb41176782d84766c4e9ed185 /src/misc/binaryheap.hpp | |
parent | 645b6ce77345867fa96861843197481131566c46 (diff) | |
download | openttd-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.hpp | 3 |
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 */ |