fix the rest of clang's default warnings

This commit is contained in:
Menche 2015-02-21 20:48:35 -08:00 committed by darkrose
parent 1fdac8b32b
commit 568a81acba
14 changed files with 9 additions and 48 deletions

View File

@ -41,7 +41,6 @@
Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, Client *client):
m_client(client),
m_smgr(smgr),
m_playernode(NULL),
m_headnode(NULL),
m_cameranode(NULL),

View File

@ -139,7 +139,6 @@ public:
private:
Client *m_client;
// Scene manager and nodes
scene::ISceneManager* m_smgr;
scene::ISceneNode* m_playernode;
scene::ISceneNode* m_headnode;
scene::ICameraSceneNode* m_cameranode;

View File

@ -40,12 +40,10 @@ GUICharDefMenu::GUICharDefMenu(
IrrlichtDevice* device,
gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
IGameCallback *gamecallback
IMenuManager *menumgr
):
GUIModalMenu(env, parent, id, menumgr),
m_accepted(false),
m_gamecallback(gamecallback)
m_accepted(false)
{
this->env = env;
this->parent = parent;

View File

@ -67,8 +67,7 @@ public:
IrrlichtDevice* device,
gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
IGameCallback *gamecallback
IMenuManager *menumgr
);
~GUICharDefMenu();
@ -114,7 +113,6 @@ public:
private:
bool m_accepted;
IGameCallback *m_gamecallback;
gui::IGUIEnvironment* env;
gui::IGUIElement* parent;

View File

@ -537,15 +537,15 @@ void MobCAO::initialize(const std::string &data)
// yaw
m_yaw = readF1000(is);
pos_translator.init(m_position,m_yaw);
// client doesn't use these, but has to read past them
// speed
v3f speed = readV3F1000(is);
readV3F1000(is);
// age
float age = readF1000(is);
readF1000(is);
// hp
age = readU8(is);
readU8(is);
// shooting
version = readU8(is);
m_shooting = !!version;
m_shooting = !!readU8(is);
}
updateNodePos();

View File

@ -872,7 +872,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
0,0,0.125,1
};
video::SColor c = MapBlock_LightColor(255,255,selected);//(255,255,255,255);
v3f pos = intToFloat(p+blockpos_nodes, BS);
v3s16 dir = unpackDir(n.param2);
video::S3DVertex *v;
video::S3DVertex vertices[3][24] = {
@ -1131,7 +1130,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
std::vector<NodeBox> boxes = content_features(n).getNodeBoxes(n);
v3s16 p2 = p;
p2.Y++;
MapNode n2 = data->m_vmanip.getNodeRO(blockpos_nodes + p2);
NodeBox box;
u8 d[8];
int bi = mapblock_mesh_check_walllike(data,n,p+blockpos_nodes,d);
@ -1831,7 +1829,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
}
v3f pos = intToFloat(p, BS);
TileSpec tile = getNodeTile(n,p,v3s16(0,0,0),data->m_temp_mods);
video::SColor c;
video::SColor c8[8];
if (selected) {

View File

@ -80,7 +80,6 @@ public:
private:
video::SMaterial m_materials[FARMESH_MATERIAL_COUNT];
core::aabbox3d<f32> m_box;
float m_cloud_y;
float m_brightness;
uint64_t m_seed;
MapGenType m_type;

View File

@ -440,7 +440,6 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
}
v2s32 topleft_content(250, 0);
v2s32 size_content = size - v2s32(300, 0);
//v2s32 size = rect.getSize();

View File

@ -94,7 +94,6 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
v2s32 size_client = size - v2s32(40, 0);
/*
Add stuff

View File

@ -79,7 +79,6 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
text = e->getText();
}else{
text = m_initial_text;
m_initial_text = L"";
}
}
@ -91,12 +90,6 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
/*
Calculate new sizes and positions
*/
//core::rect<s32> rect(
//screensize.X/2 - 160,
//screensize.Y/2 - 60,
//screensize.X/2 + 160,
//screensize.Y/2 + 60
//);
core::rect<s32> rect(
100,
screensize.Y - 100,
@ -107,8 +100,6 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
DesiredRect = rect;
recalculateAbsolutePosition(false);
v2s32 size = rect.getSize();
/*
Add stuff
*/

View File

@ -1366,7 +1366,7 @@ int main(int argc, char *argv[])
character_creator = false;
video::IVideoDriver* driver = device->getVideoDriver();
GUICharDefMenu *menu = new GUICharDefMenu(device, guienv, guiroot, -1, &g_menumgr, g_gamecallback);
GUICharDefMenu *menu = new GUICharDefMenu(device, guienv, guiroot, -1, &g_menumgr);
menu->allowFocusRemoval(true);
while (device->run() && kill == false) {

View File

@ -214,8 +214,6 @@ void makeFastFace(TileSpec tile, u8 li0, u8 li1, u8 li2, u8 li3, v3f p,
abs_scale = scale.Z;
}
v3f zerovector = v3f(0,0,0);
u8 alpha = tile.alpha;
float x0 = tile.texture.pos.X;

View File

@ -90,10 +90,6 @@ private:
v3s16 m_camera_offset;
v3f m_velocity;
v3f m_acceleration;
float tex_x0;
float tex_x1;
float tex_y0;
float tex_y1;
LocalPlayer *m_player;
float m_size;
AtlasPointer *m_ap;

View File

@ -682,14 +682,9 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
core::list<CollisionInfo> *collision_info)
{
v3f position = getPosition();
v3f oldpos = position;
v3s16 oldpos_i = floatToInt(oldpos, BS);
v3f old_speed = m_speed;
/*std::cout<<"oldpos_i=("<<oldpos_i.X<<","<<oldpos_i.Y<<","
<<oldpos_i.Z<<")"<<std::endl;*/
/*
Calculate new position
*/
@ -701,13 +696,6 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
return;
}
/*
Collision detection
*/
// Player position in nodes
v3s16 pos_i = floatToInt(position, BS);
/*
Check if player is in water (the oscillating value)
*/