(svn r20211) -Codechange: Indented code should have curly braces around it.
This commit is contained in:
@@ -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 */
|
||||
|
@@ -263,12 +263,14 @@ public:
|
||||
tmp->capacity = new_size - (header_size + tail_reserve);
|
||||
|
||||
/* copy existing data */
|
||||
if (tmp->items != 0)
|
||||
if (tmp->items != 0) {
|
||||
memcpy(tmp + 1, data, tmp->items);
|
||||
}
|
||||
|
||||
/* replace our block with new one */
|
||||
if (Capacity() > 0)
|
||||
if (Capacity() > 0) {
|
||||
RawFree(&Hdr());
|
||||
}
|
||||
Init(tmp);
|
||||
}
|
||||
|
||||
|
@@ -22,8 +22,9 @@ struct CCrc32
|
||||
|
||||
uint8 *begin = (uint8*)pBuffer;
|
||||
uint8 *end = begin + nCount;
|
||||
for (uint8 *cur = begin; cur < end; cur++)
|
||||
for (uint8 *cur = begin; cur < end; cur++) {
|
||||
crc = (crc >> 8) ^ pTable[cur[0] ^ (uint8)(crc & 0xff)];
|
||||
}
|
||||
crc ^= 0xffffffff;
|
||||
|
||||
return crc;
|
||||
|
Reference in New Issue
Block a user