1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Make proper use of override in server.h

Fixes warnings introduced by 08b7870.
Also removes unused virutal from getEmergeManager().
This commit is contained in:
Desour 2025-09-21 23:02:37 +02:00
parent 08b7870c79
commit 20f8eb9a6c
2 changed files with 21 additions and 21 deletions

View file

@ -254,7 +254,7 @@ public:
This is accessed by the map, which is inside the environment, This is accessed by the map, which is inside the environment,
so it shouldn't be a problem. so it shouldn't be a problem.
*/ */
void onMapEditEvent(const MapEditEvent &event); void onMapEditEvent(const MapEditEvent &event) override;
// Connection must be locked when called // Connection must be locked when called
std::string getStatusString(); std::string getStatusString();
@ -321,26 +321,26 @@ public:
// IGameDef interface // IGameDef interface
bool isClient() override { return false; } bool isClient() override { return false; }
// Under envlock // Under envlock
virtual IItemDefManager* getItemDefManager(); IItemDefManager* getItemDefManager() override;
virtual const NodeDefManager* getNodeDefManager(); const NodeDefManager* getNodeDefManager() override;
virtual ICraftDefManager* getCraftDefManager(); ICraftDefManager* getCraftDefManager() override;
virtual u16 allocateUnknownNodeId(const std::string &name); u16 allocateUnknownNodeId(const std::string &name) override;
IRollbackManager *getRollbackManager() { return m_rollback; } IRollbackManager *getRollbackManager() override { return m_rollback; }
virtual EmergeManager *getEmergeManager() { return m_emerge.get(); } EmergeManager *getEmergeManager() { return m_emerge.get(); }
virtual ModStorageDatabase *getModStorageDatabase() { return m_mod_storage_database; } ModStorageDatabase *getModStorageDatabase() override { return m_mod_storage_database; }
IWritableItemDefManager* getWritableItemDefManager(); IWritableItemDefManager* getWritableItemDefManager();
NodeDefManager* getWritableNodeDefManager(); NodeDefManager* getWritableNodeDefManager();
IWritableCraftDefManager* getWritableCraftDefManager(); IWritableCraftDefManager* getWritableCraftDefManager();
// Not under envlock // Not under envlock
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;
virtual const SubgameSpec* getGameSpec() const { return &m_gamespec; } const SubgameSpec* getGameSpec() const override { return &m_gamespec; }
static std::string getBuiltinLuaPath(); static std::string getBuiltinLuaPath();
virtual std::string getWorldPath() const { return m_path_world; } std::string getWorldPath() const override { return m_path_world; }
virtual std::string getModDataPath() const { return m_path_mod_data; } std::string getModDataPath() const override { return m_path_mod_data; }
virtual ModIPCStore *getModIPCStore() { return &m_ipcstore; } ModIPCStore *getModIPCStore() override { return &m_ipcstore; }
inline bool isSingleplayer() const inline bool isSingleplayer() const
{ return m_simple_singleplayer_mode; } { return m_simple_singleplayer_mode; }
@ -394,8 +394,8 @@ public:
void setLighting(RemotePlayer *player, const Lighting &lighting); void setLighting(RemotePlayer *player, const Lighting &lighting);
/* con::PeerHandler implementation. */ /* con::PeerHandler implementation. */
void peerAdded(con::IPeer *peer); void peerAdded(con::IPeer *peer) override;
void deletingPeer(con::IPeer *peer, bool timeout); void deletingPeer(con::IPeer *peer, bool timeout) override;
void DenySudoAccess(session_t peer_id); void DenySudoAccess(session_t peer_id);
void DenyAccess(session_t peer_id, AccessDeniedCode reason, void DenyAccess(session_t peer_id, AccessDeniedCode reason,
@ -426,10 +426,10 @@ public:
void sendDetachedInventories(session_t peer_id, bool incremental); void sendDetachedInventories(session_t peer_id, bool incremental);
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, const std::string &message) override;
ModChannel *getModChannel(const std::string &channel); ModChannel *getModChannel(const std::string &channel) override;
// Send block to specific player only // Send block to specific player only
bool SendBlock(session_t peer_id, const v3s16 &blockpos); bool SendBlock(session_t peer_id, const v3s16 &blockpos);

View file

@ -32,5 +32,5 @@ public:
void stop() = delete; void stop() = delete;
private: private:
void SendChatMessage(session_t peer_id, const ChatMessage &message) {} void SendChatMessage(session_t peer_id, const ChatMessage &message) override {}
}; };