Minor cleanups

- remove redundant conditional
 - remove unused vars
 - remove extra ags to printf
 - reduce scope of decl
This commit is contained in:
Andy Maloney 2013-12-04 16:45:09 -05:00
parent 65099897f4
commit 396a7064dc
6 changed files with 5 additions and 8 deletions

View file

@ -1116,7 +1116,6 @@ void NetConnection::validateSendString(const char *str)
void NetConnection::packString(BitStream *stream, const char *str)
{
char buf[16];
if(!*str)
{
stream->writeInt(NullString, 2);
@ -1130,6 +1129,7 @@ void NetConnection::packString(BitStream *stream, const char *str)
}
if(str[0] == '-' || (str[0] >= '0' && str[0] <= '9'))
{
char buf[16];
S32 num = dAtoi(str);
dSprintf(buf, sizeof(buf), "%d", num);
if(!dStrcmp(buf, str))