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): Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, Client *client):
m_client(client), m_client(client),
m_smgr(smgr),
m_playernode(NULL), m_playernode(NULL),
m_headnode(NULL), m_headnode(NULL),
m_cameranode(NULL), m_cameranode(NULL),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1366,7 +1366,7 @@ int main(int argc, char *argv[])
character_creator = false; character_creator = false;
video::IVideoDriver* driver = device->getVideoDriver(); 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); menu->allowFocusRemoval(true);
while (device->run() && kill == false) { 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; abs_scale = scale.Z;
} }
v3f zerovector = v3f(0,0,0);
u8 alpha = tile.alpha; u8 alpha = tile.alpha;
float x0 = tile.texture.pos.X; float x0 = tile.texture.pos.X;

View File

@ -90,10 +90,6 @@ private:
v3s16 m_camera_offset; v3s16 m_camera_offset;
v3f m_velocity; v3f m_velocity;
v3f m_acceleration; v3f m_acceleration;
float tex_x0;
float tex_x1;
float tex_y0;
float tex_y1;
LocalPlayer *m_player; LocalPlayer *m_player;
float m_size; float m_size;
AtlasPointer *m_ap; 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) core::list<CollisionInfo> *collision_info)
{ {
v3f position = getPosition(); v3f position = getPosition();
v3f oldpos = position;
v3s16 oldpos_i = floatToInt(oldpos, BS);
v3f old_speed = m_speed; v3f old_speed = m_speed;
/*std::cout<<"oldpos_i=("<<oldpos_i.X<<","<<oldpos_i.Y<<","
<<oldpos_i.Z<<")"<<std::endl;*/
/* /*
Calculate new position Calculate new position
*/ */
@ -701,13 +696,6 @@ void LocalPlayer::move(f32 dtime, Map &map, f32 pos_max_d,
return; return;
} }
/*
Collision detection
*/
// Player position in nodes
v3s16 pos_i = floatToInt(position, BS);
/* /*
Check if player is in water (the oscillating value) Check if player is in water (the oscillating value)
*/ */