(svn r20211) -Codechange: Indented code should have curly braces around it.

This commit is contained in:
alberth
2010-07-24 10:14:39 +00:00
parent 3dc9989841
commit 137e2b64c9
49 changed files with 206 additions and 177 deletions

View File

@@ -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 */

View File

@@ -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);
}

View File

@@ -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;