Merge pull request #546 from asmaloney/minor_cleanup

Minor cleanups
This commit is contained in:
Thomas Fischer 2014-03-15 15:20:23 +01:00
commit 8529d4450b
6 changed files with 5 additions and 8 deletions

View file

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

View file

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

View file

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

View file

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

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))

View file

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