Commit 396a7064 authored by Andy's avatar Andy

Minor cleanups

 - remove redundant conditional
 - remove unused vars
 - remove extra ags to printf
 - reduce scope of decl
parent 65099897
......@@ -614,7 +614,7 @@ void GameBase::onUnmount( SceneObject *obj, S32 node )
bool GameBase::setDataBlockProperty( void *obj, const char *index, const char *db)
{
if( db == NULL || !db || !db[ 0 ] )
if( db == NULL || !db[ 0 ] )
{
Con::errorf( "GameBase::setDataBlockProperty - Can't unset datablock on GameBase objects" );
return false;
......
......@@ -265,7 +265,7 @@ void GFont::dumpInfo() const
if(mapCount)
Con::printf(" - Codepoints range from 0x%x to 0x%x.", mapBegin, mapEnd);
else
Con::printf(" - No mapped codepoints.", mapBegin, mapEnd);
Con::printf(" - No mapped codepoints.");
Con::printf(" - Platform font is %s.", (mPlatformFont ? "present" : "not present") );
}
......
......@@ -401,10 +401,9 @@ void NavMesh::buildNextTile()
nm->removeTile(nm->getTileRefAt(tile.x, tile.y, 0), 0, 0);
// Add new data (navmesh owns and deletes the data).
dtStatus status = nm->addTile(data, dataSize, DT_TILE_FREE_DATA, 0, 0);
int success = 1;
if(dtStatusFailed(status))
{
success = 0;
dtFree(data);
}
}
......
......@@ -217,7 +217,7 @@ void StdConsole::process()
// mojo for select call
fd_set rfds;
struct timeval tv;
int retval;
FD_ZERO(&rfds);
FD_SET(stdIn, &rfds);
// don't wait at all in select
......
......@@ -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))
......
......@@ -288,7 +288,6 @@ void Settings::readLayer(SimXMLDocument *document, String groupStack)
{
for(S32 i=0; document->pushChildElement(i); i++)
{
bool groupCount = 0;
const UTF8 *type = document->elementValue();
const UTF8 *name = document->attribute("name");
const UTF8 *value = document->getText();
......@@ -302,7 +301,6 @@ void Settings::readLayer(SimXMLDocument *document, String groupStack)
newStack += name;
readLayer(document, newStack);
groupCount++;
} else if(dStrcmp(type, "Setting") == 0)
{
String nameString = groupStack;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment