1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove unused functions reported by cppcheck (#10463)

Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
This commit is contained in:
SmallJoker 2020-10-05 09:07:33 +02:00 committed by GitHub
parent 81c66d6efb
commit f46509d5e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 14 additions and 440 deletions

View file

@ -81,33 +81,6 @@ void MeshMakeData::fill(MapBlock *block)
}
}
void MeshMakeData::fillSingleNode(MapNode *node)
{
m_blockpos = v3s16(0,0,0);
v3s16 blockpos_nodes = v3s16(0,0,0);
VoxelArea area(blockpos_nodes-v3s16(1,1,1)*MAP_BLOCKSIZE,
blockpos_nodes+v3s16(1,1,1)*MAP_BLOCKSIZE*2-v3s16(1,1,1));
s32 volume = area.getVolume();
s32 our_node_index = area.index(1,1,1);
// Allocate this block + neighbors
m_vmanip.clear();
m_vmanip.addArea(area);
// Fill in data
MapNode *data = new MapNode[volume];
for(s32 i = 0; i < volume; i++)
{
if (i == our_node_index)
data[i] = *node;
else
data[i] = MapNode(CONTENT_AIR, LIGHT_MAX, 0);
}
m_vmanip.copyFrom(data, area, area.MinEdge, area.MinEdge, area.getExtent());
delete[] data;
}
void MeshMakeData::setCrack(int crack_level, v3s16 crack_pos)
{
if (crack_level >= 0)