mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 19:42:10 +00:00
Deal with compiler warnings
This commit is contained in:
parent
faecff570c
commit
a89afe1229
12 changed files with 30 additions and 30 deletions
|
@ -407,7 +407,7 @@ public:
|
|||
}
|
||||
|
||||
ClientScripting *getScript() { return m_script; }
|
||||
const bool modsLoaded() const { return m_mods_loaded; }
|
||||
bool modsLoaded() const { return m_mods_loaded; }
|
||||
|
||||
void pushToEventQueue(ClientEvent *event);
|
||||
|
||||
|
|
|
@ -81,9 +81,9 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
void drop()
|
||||
void drop() override
|
||||
{
|
||||
ISceneNode::drop();
|
||||
ISceneNode::drop(); // calls destructor
|
||||
}
|
||||
|
||||
void updateCamera(v3f pos, v3f dir, f32 fov, v3s16 offset);
|
||||
|
@ -91,24 +91,22 @@ public:
|
|||
/*
|
||||
Forcefully get a sector from somewhere
|
||||
*/
|
||||
MapSector * emergeSector(v2s16 p);
|
||||
|
||||
//void deSerializeSector(v2s16 p2d, std::istream &is);
|
||||
MapSector * emergeSector(v2s16 p) override;
|
||||
|
||||
/*
|
||||
ISceneNode methods
|
||||
*/
|
||||
|
||||
virtual void OnRegisterSceneNode();
|
||||
virtual void OnRegisterSceneNode() override;
|
||||
|
||||
virtual void render()
|
||||
virtual void render() override
|
||||
{
|
||||
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||
renderMap(driver, SceneManager->getSceneNodeRenderPass());
|
||||
}
|
||||
|
||||
virtual const aabb3f &getBoundingBox() const
|
||||
virtual const aabb3f &getBoundingBox() const override
|
||||
{
|
||||
return m_box;
|
||||
}
|
||||
|
@ -130,7 +128,7 @@ public:
|
|||
void renderPostFx(CameraMode cam_mode);
|
||||
|
||||
// For debug printing
|
||||
virtual void PrintInfo(std::ostream &out);
|
||||
void PrintInfo(std::ostream &out) override;
|
||||
|
||||
const MapDrawControl & getControl() const { return m_control; }
|
||||
f32 getWantedRange() const { return m_control.wanted_range; }
|
||||
|
|
|
@ -435,7 +435,7 @@ const v3f GenericCAO::getPosition() const
|
|||
return m_position;
|
||||
}
|
||||
|
||||
const bool GenericCAO::isImmortal()
|
||||
bool GenericCAO::isImmortal() const
|
||||
{
|
||||
return itemgroup_get(getGroups(), "immortal");
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ public:
|
|||
|
||||
inline const v3f &getRotation() const { return m_rotation; }
|
||||
|
||||
const bool isImmortal();
|
||||
bool isImmortal() const;
|
||||
|
||||
inline const ObjectProperties &getProperties() const { return m_prop; }
|
||||
|
||||
|
|
|
@ -1063,9 +1063,9 @@ bool Game::startup(bool *kill,
|
|||
void Game::run()
|
||||
{
|
||||
ProfilerGraph graph;
|
||||
RunStats stats = { 0 };
|
||||
CameraOrientation cam_view_target = { 0 };
|
||||
CameraOrientation cam_view = { 0 };
|
||||
RunStats stats;
|
||||
CameraOrientation cam_view_target = {};
|
||||
CameraOrientation cam_view = {};
|
||||
FpsControl draw_times;
|
||||
f32 dtime; // in seconds
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ void Minimap::setModeIndex(size_t index)
|
|||
data->mode = m_modes[index];
|
||||
m_current_mode_index = index;
|
||||
} else {
|
||||
data->mode = MinimapModeDef{MINIMAP_TYPE_OFF, gettext("Minimap hidden"), 0, 0, ""};
|
||||
data->mode = {MINIMAP_TYPE_OFF, gettext("Minimap hidden"), 0, 0, "", 0};
|
||||
m_current_mode_index = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "profiler.h"
|
||||
|
||||
ShadowRenderer::ShadowRenderer(IrrlichtDevice *device, Client *client) :
|
||||
m_device(device), m_smgr(device->getSceneManager()),
|
||||
m_driver(device->getVideoDriver()), m_client(client), m_current_frame(0),
|
||||
m_smgr(device->getSceneManager()), m_driver(device->getVideoDriver()),
|
||||
m_client(client), m_current_frame(0),
|
||||
m_perspective_bias_xy(0.8), m_perspective_bias_z(0.5)
|
||||
{
|
||||
(void) m_client;
|
||||
|
||||
m_shadows_supported = true; // assume shadows supported. We will check actual support in initialize
|
||||
m_shadows_enabled = true;
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ private:
|
|||
void enable() { m_shadows_enabled = m_shadows_supported; }
|
||||
|
||||
// a bunch of variables
|
||||
IrrlichtDevice *m_device{nullptr};
|
||||
scene::ISceneManager *m_smgr{nullptr};
|
||||
video::IVideoDriver *m_driver{nullptr};
|
||||
Client *m_client{nullptr};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue