forked from mirror/OpenTTD
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
This commit is contained in:
@@ -158,7 +158,7 @@ bool BinaryHeap::Delete(void *item, int priority)
|
||||
|
||||
for (;;) {
|
||||
j = i;
|
||||
/* Check if we have 2 childs */
|
||||
/* Check if we have 2 children */
|
||||
if (2 * j + 1 <= this->size) {
|
||||
/* Is this child smaller than the parent? */
|
||||
if (this->GetElement(j).priority >= this->GetElement(2 * j).priority) i = 2 * j;
|
||||
@@ -170,13 +170,13 @@ bool BinaryHeap::Delete(void *item, int priority)
|
||||
if (this->GetElement(j).priority >= this->GetElement(2 * j).priority) i = 2 * j;
|
||||
}
|
||||
|
||||
/* One of our childs is smaller than we are, switch */
|
||||
/* One of our children is smaller than we are, switch */
|
||||
if (i != j) {
|
||||
temp = this->GetElement(j);
|
||||
this->GetElement(j) = this->GetElement(i);
|
||||
this->GetElement(i) = temp;
|
||||
} else {
|
||||
/* None of our childs is smaller, so we stay here.. stop :) */
|
||||
/* None of our children is smaller, so we stay here.. stop :) */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user