fixed warnings reported by cppcheck
This commit is contained in:
parent
3f153c20d3
commit
9d4e9c59de
|
@ -82,7 +82,8 @@ Client::Client(
|
|||
camera_direction(0,0,1),
|
||||
m_server_ser_ver(SER_FMT_VER_INVALID),
|
||||
m_inventory_updated(false),
|
||||
m_time_of_day(0)
|
||||
m_time_of_day(0),
|
||||
m_map_seed(0)
|
||||
{
|
||||
m_packetcounter_timer = 0.0;
|
||||
m_delete_unused_sectors_timer = 0.0;
|
||||
|
|
|
@ -404,7 +404,8 @@ RatCAO::RatCAO():
|
|||
ClientActiveObject(0),
|
||||
m_selection_box(-BS/3.,0.0,-BS/3., BS/3.,BS/2.,BS/3.),
|
||||
m_node(NULL),
|
||||
m_position(v3f(0,10*BS,0))
|
||||
m_position(v3f(0,10*BS,0)),
|
||||
m_yaw(0)
|
||||
{
|
||||
ClientActiveObject::registerType(getType(), create);
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ DebugStack::DebugStack(threadid_t id)
|
|||
threadid = id;
|
||||
stack_i = 0;
|
||||
stack_max_i = 0;
|
||||
memset(stack, 0, DEBUG_STACK_SIZE*DEBUG_STACK_TEXT_SIZE);
|
||||
}
|
||||
|
||||
void DebugStack::print(FILE *file, bool everything)
|
||||
|
|
|
@ -6030,7 +6030,8 @@ void MapVoxelManipulator::blitBack
|
|||
}
|
||||
|
||||
ManualMapVoxelManipulator::ManualMapVoxelManipulator(Map *map):
|
||||
MapVoxelManipulator(map)
|
||||
MapVoxelManipulator(map),
|
||||
m_create_area(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -780,7 +780,8 @@ struct ChunkMakeData
|
|||
|
||||
ChunkMakeData():
|
||||
no_op(false),
|
||||
vmanip(NULL)
|
||||
vmanip(NULL),
|
||||
seed(0)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -564,6 +564,7 @@ public:
|
|||
m_selection_box = new core::aabbox3d<f32>
|
||||
(-BS*0.3,-BS*.25,-BS*0.3, BS*0.3,BS*0.25,BS*0.3);
|
||||
|
||||
m_yaw = 0;
|
||||
m_counter1 = 0;
|
||||
m_counter2 = 0;
|
||||
m_age = 0;
|
||||
|
@ -906,7 +907,8 @@ class PlayerObject : public MovingObject
|
|||
public:
|
||||
PlayerObject(MapBlock *block, s16 id, v3f pos):
|
||||
MovingObject(block, id, pos),
|
||||
m_node(NULL)
|
||||
m_node(NULL),
|
||||
m_yaw(0)
|
||||
{
|
||||
m_collision_box = new core::aabbox3d<f32>
|
||||
(-BS*0.3,-BS*.25,-BS*0.3, BS*0.3,BS*0.25,BS*0.3);
|
||||
|
|
|
@ -892,6 +892,7 @@ void RemoteClient::SetBlocksNotSent(core::map<v3s16, MapBlock*> &blocks)
|
|||
PlayerInfo::PlayerInfo()
|
||||
{
|
||||
name[0] = 0;
|
||||
avg_rtt = 0;
|
||||
}
|
||||
|
||||
void PlayerInfo::PrintLine(std::ostream *s)
|
||||
|
|
|
@ -53,6 +53,8 @@ void sockets_cleanup()
|
|||
|
||||
Address::Address()
|
||||
{
|
||||
m_address = 0;
|
||||
m_port = 0;
|
||||
}
|
||||
|
||||
Address::Address(unsigned int address, unsigned short port)
|
||||
|
|
|
@ -1903,7 +1903,7 @@ inline v3f intToFloat(v3s16 p, f32 d)
|
|||
*/
|
||||
|
||||
// Creates a string with the length as the first two bytes
|
||||
inline std::string serializeString(const std::string plain)
|
||||
inline std::string serializeString(const std::string &plain)
|
||||
{
|
||||
assert(plain.size() <= 65535);
|
||||
char buf[2];
|
||||
|
@ -1945,7 +1945,7 @@ inline std::string deSerializeString(std::istream &is)
|
|||
}
|
||||
|
||||
// Creates a string with the length as the first four bytes
|
||||
inline std::string serializeLongString(const std::string plain)
|
||||
inline std::string serializeLongString(const std::string &plain)
|
||||
{
|
||||
char buf[4];
|
||||
writeU32((u8*)&buf[0], plain.size());
|
||||
|
|
|
@ -553,7 +553,7 @@ public:
|
|||
/*
|
||||
Some settings
|
||||
*/
|
||||
bool m_disable_water_climb;
|
||||
//bool m_disable_water_climb;
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue