more sequence/order of operations stuff

This commit is contained in:
DarthArgus
2015-10-13 11:36:05 -05:00
parent a790a1a88d
commit 2a2b6dd4b7
5 changed files with 22 additions and 9 deletions
@@ -19,10 +19,14 @@ class CTServiceCustomer
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])){
target[length-1] = 0;
offset++;
}
}
public:
enum { SHORT_NAME_SIZE=64, SHORT_NAME_BUFFER,
PHONE_SIZE=32, PHONE_BUFFER,
@@ -22,9 +22,12 @@ class CTServiceDBOrder
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])){
target[length-1] = 0;
offset++;
}
}
public:
@@ -21,9 +21,12 @@ class CTServiceTransaction
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])){
target[length-1] = 0;
offset++;
}
}
public:
@@ -21,9 +21,12 @@ class CTServiceWebAPITransaction
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])) {
target[length-1] = 0;
offset++;
}
}
typedef unsigned short uchar_t;
@@ -614,7 +614,7 @@ inline int UpperHashString(const char *string)
int h = 0;
while (*string != 0)
{
h = ((31 * h) + (*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string) ^ (h >> 26);
h = ((31 * h) + ((*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string)) ^ (h >> 26);
string++;
}
return(h);