Page 1 of 1

Some cleanup items

Posted: Sun Dec 31, 2017 3:47 pm
by Gangrenous
Be sure to check behind me, I am a rookie.

AltAdvancement.cpp around line 245

Before

Code: Select all

for (int x = 0; x < TreeNodeList.size(); x++)
After

Code: Select all

for (uint x = 0; x < TreeNodeList.size(); x++)
Commands.cpp around 5706

Code: Select all

//delete this is unused
int64 value = 0;
Luafunctions.cpp around line 6409

Both of these look unused

Code: Select all

//int32 duration = lua_interface->GetInt32Value(state, 3);
float vertical = lua_interface->GetFloatValue(state, 4);
float horizontal = lua_interface->GetFloatValue(state, 5);
bool use_heading = lua_interface->GetInt8Value(state, 6) == 1 ? true : false;
//LuaSpell* spell = lua_interface->GetCurrentSpell(state);
PlayerGroups.cpp around 284

This looks unused

Code: Select all

int32 group_size = m_groups[leader->GetGroupMemberInfo()->group_id]->Size();
Log.cpp around 310

This should be long unsigned

Code: Select all

fprintf(stderr, "%s: %u: Unable to allocate %lu bytes\n", __FUNCTION__, __LINE__, sizeof(logq_t));

Re: Some cleanup items

Posted: Sun Dec 31, 2017 3:48 pm
by Gangrenous
MiscFunctions.cpp around line 742

Should be long unsigned

Code: Select all

fprintf(stderr, "%s: %u: Unable to allocate %lu bytes\n", __FUNCTION__, __LINE__, size);

Re: Some cleanup items

Posted: Sun Dec 31, 2017 4:00 pm
by tyrbo
The section with the vertical stuff is from the Knockback function, right?
It's being used in my copy of the code, but maybe I've changed it.

Re: Some cleanup items

Posted: Mon Jan 01, 2018 3:13 am
by Gangrenous
Yep