Fix various Client class functions not marked as override (virtual)

Also switch some of them which are reported by clang-tidy
This commit is contained in:
Loic Blot 2018-03-29 13:30:18 +02:00
parent 71b2570f09
commit 83fc0fd2f1
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987

@ -253,8 +253,8 @@ public:
static const std::string &getBuiltinLuaPath(); static const std::string &getBuiltinLuaPath();
static const std::string &getClientModsLuaPath(); static const std::string &getClientModsLuaPath();
virtual const std::vector<ModSpec> &getMods() const; const std::vector<ModSpec> &getMods() const override;
virtual const ModSpec* getModSpec(const std::string &modname) const; const ModSpec* getModSpec(const std::string &modname) const override;
// Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent) // Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent)
void removeNode(v3s16 p); void removeNode(v3s16 p);
@ -282,8 +282,8 @@ public:
void getLocalInventory(Inventory &dst); void getLocalInventory(Inventory &dst);
/* InventoryManager interface */ /* InventoryManager interface */
Inventory* getInventory(const InventoryLocation &loc); Inventory* getInventory(const InventoryLocation &loc) override;
void inventoryAction(InventoryAction *a); void inventoryAction(InventoryAction *a) override;
const std::list<std::string> &getConnectedPlayerNames() const std::list<std::string> &getConnectedPlayerNames()
{ {
@ -365,24 +365,24 @@ public:
bool shouldShowMinimap() const; bool shouldShowMinimap() const;
// IGameDef interface // IGameDef interface
virtual IItemDefManager* getItemDefManager(); IItemDefManager* getItemDefManager() override;
virtual const NodeDefManager* getNodeDefManager(); const NodeDefManager* getNodeDefManager() override;
virtual ICraftDefManager* getCraftDefManager(); ICraftDefManager* getCraftDefManager() override;
ITextureSource* getTextureSource(); ITextureSource* getTextureSource();
virtual IShaderSource* getShaderSource(); virtual IShaderSource* getShaderSource();
IShaderSource *shsrc() { return getShaderSource(); } IShaderSource *shsrc() { return getShaderSource(); }
virtual u16 allocateUnknownNodeId(const std::string &name); u16 allocateUnknownNodeId(const std::string &name) override;
virtual ISoundManager* getSoundManager(); virtual ISoundManager* getSoundManager();
virtual MtEventManager* getEventManager(); MtEventManager* getEventManager() override;
virtual ParticleManager* getParticleManager(); virtual ParticleManager* getParticleManager();
bool checkLocalPrivilege(const std::string &priv) bool checkLocalPrivilege(const std::string &priv)
{ return checkPrivilege(priv); } { return checkPrivilege(priv); }
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false); virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
const std::string* getModFile(const std::string &filename); const std::string* getModFile(const std::string &filename);
virtual std::string getModStoragePath() const; std::string getModStoragePath() const override;
virtual bool registerModStorage(ModMetadata *meta); bool registerModStorage(ModMetadata *meta) override;
virtual void unregisterModStorage(const std::string &name); void unregisterModStorage(const std::string &name) override;
// The following set of functions is used by ClientMediaDownloader // The following set of functions is used by ClientMediaDownloader
// Insert a media file appropriately into the appropriate manager // Insert a media file appropriately into the appropriate manager
@ -428,10 +428,11 @@ public:
return m_hud_server_to_client; return m_hud_server_to_client;
} }
bool joinModChannel(const std::string &channel); bool joinModChannel(const std::string &channel) override;
bool leaveModChannel(const std::string &channel); bool leaveModChannel(const std::string &channel) override;
bool sendModChannelMessage(const std::string &channel, const std::string &message); bool sendModChannelMessage(const std::string &channel,
ModChannel *getModChannel(const std::string &channel); const std::string &message) override;
ModChannel *getModChannel(const std::string &channel) override;
const std::string &getFormspecPrepend() const const std::string &getFormspecPrepend() const
{ {
@ -442,8 +443,8 @@ private:
bool checkBuiltinIntegrity(); bool checkBuiltinIntegrity();
// Virtual methods from con::PeerHandler // Virtual methods from con::PeerHandler
void peerAdded(con::Peer *peer); void peerAdded(con::Peer *peer) override;
void deletingPeer(con::Peer *peer, bool timeout); void deletingPeer(con::Peer *peer, bool timeout) override;
void initLocalMapSaving(const Address &address, void initLocalMapSaving(const Address &address,
const std::string &hostname, const std::string &hostname,