Whitespace cleanup on for() loops

This commit is contained in:
Bluechip
2015-06-17 23:12:32 +01:00
parent 7d926499b4
commit 6af9a1b485

View File

@@ -245,14 +245,14 @@ void IRsend::sendPanasonic (unsigned int address, unsigned long data)
mark(PANASONIC_HDR_MARK);
space(PANASONIC_HDR_SPACE);
for(int i=0;i<16;i++)
for (int i = 0; i < 16; i++)
{
mark(PANASONIC_BIT_MARK);
if (address & 0x8000) space(PANASONIC_ONE_SPACE) ;
else space(PANASONIC_ZERO_SPACE) ;
address <<= 1;
}
for (int i=0; i < 32; i++) {
for (int i = 0; i < 32; i++) {
mark(PANASONIC_BIT_MARK);
if (data & TOPBIT) space(PANASONIC_ONE_SPACE) ;
else space(PANASONIC_ZERO_SPACE) ;
@@ -1129,7 +1129,7 @@ long IRrecv::decodeHash (decode_results *results)
// Require at least 6 samples to prevent triggering on noise
if (results->rawlen < 6) return ERR ;
long hash = FNV_BASIS_32;
for (int i = 1; i+2 < results->rawlen; i++) {
for (int i = 1; (i + 2) < results->rawlen; i++) {
int value = compare(results->rawbuf[i], results->rawbuf[i+2]);
// Add value into the hash
hash = (hash * FNV_PRIME_32) ^ value;
@@ -1171,7 +1171,7 @@ void IRsend::sendSharp (unsigned long data, int nbits)
// Sending codes in bursts of 3 (normal, inverted, normal) makes transmission
// much more reliable. That's the exact behaviour of CD-S6470 remote control.
for (int n = 0; n < 3; n++) {
for (int i = 1 << (nbits-1); i > 0; i>>=1) {
for (int i = 1 << (nbits - 1); i > 0; i >>= 1) {
if (data & i) {
mark(SHARP_BIT_MARK);
space(SHARP_ONE_SPACE);
@@ -1242,7 +1242,7 @@ void IRsend::sendAiwaRCT501 (int code)
// Skip leading zero's
pre <<= 6;
// Send pre-data
for(i=0; i < 26; i++) {
for (i = 0; i < 26; i++) {
mark(AIWA_RC_T501_BIT_MARK);
if (pre & TOPBIT) space(AIWA_RC_T501_ONE_SPACE) ;
else space(AIWA_RC_T501_ZERO_SPACE) ;
@@ -1252,7 +1252,7 @@ void IRsend::sendAiwaRCT501 (int code)
// Skip firts code bit
code <<= 1;
// Send code
for(i=0; i < 15; i++) {
for (i = 0; i < 15; i++) {
mark(AIWA_RC_T501_BIT_MARK);
if (code & TOPBIT) space(AIWA_RC_T501_ONE_SPACE) ;
else space(AIWA_RC_T501_ZERO_SPACE) ;