Merge pull request #2117 from Seadragon91/clang_errors
Fixed missing overrides and added a ignore flag for reserved macro for clang version 3.6 and higher.
This commit is contained in:
commit
7e0dc0f9bc
@ -263,6 +263,10 @@ macro(set_exe_flags)
|
||||
# flags introduced in 3.2
|
||||
add_flags_cxx("-Wno-documentation")
|
||||
endif()
|
||||
if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
|
||||
# Use this flag to ignore error for a reserved macro problem in sqlite 3
|
||||
add_flags_cxx("-Wno-reserved-id-macro")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -179,7 +179,7 @@ public:
|
||||
bool CanAddOldStyleHook(int a_HookType);
|
||||
|
||||
// cWebPlugin overrides
|
||||
virtual const AString GetWebTitle(void) const {return GetName(); }
|
||||
virtual const AString GetWebTitle(void) const override {return GetName(); }
|
||||
virtual AString HandleWebRequest(const HTTPRequest & a_Request) override;
|
||||
|
||||
/** Adds a new web tab to webadmin.
|
||||
|
@ -76,7 +76,7 @@ protected:
|
||||
cItemGrid m_Contents;
|
||||
|
||||
// cItemGrid::cListener overrides:
|
||||
virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum)
|
||||
virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) override
|
||||
{
|
||||
UNUSED(a_SlotNum);
|
||||
ASSERT(a_Grid == &m_Contents);
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
virtual void UsedBy(cPlayer * a_Player) override;
|
||||
virtual void SendTo(cClientHandle &) override {}
|
||||
|
||||
virtual void SetRedstonePower(bool a_Value)
|
||||
virtual void SetRedstonePower(bool a_Value) override
|
||||
{
|
||||
if (a_Value)
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
|
||||
virtual void OnUpdate(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override
|
||||
{
|
||||
UNUSED(a_ChunkInterface);
|
||||
UNUSED(a_WorldInterface);
|
||||
|
@ -135,7 +135,7 @@ protected:
|
||||
virtual void Destroyed() override;
|
||||
|
||||
// cItemGrid::cListener overrides:
|
||||
virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum)
|
||||
virtual void OnSlotChanged(cItemGrid * a_Grid, int a_SlotNum) override
|
||||
{
|
||||
UNUSED(a_SlotNum);
|
||||
ASSERT(a_Grid == &m_Contents);
|
||||
|
@ -483,11 +483,11 @@ public:
|
||||
bool PlaceBlocks(const sSetBlockVector & a_Blocks);
|
||||
|
||||
// cEntity overrides:
|
||||
virtual bool IsCrouched (void) const { return m_IsCrouched; }
|
||||
virtual bool IsSprinting(void) const { return m_IsSprinting; }
|
||||
virtual bool IsRclking (void) const { return IsEating() || IsChargingBow(); }
|
||||
virtual bool IsCrouched (void) const override { return m_IsCrouched; }
|
||||
virtual bool IsSprinting(void) const override { return m_IsSprinting; }
|
||||
virtual bool IsRclking (void) const override { return IsEating() || IsChargingBow(); }
|
||||
|
||||
virtual void Detach(void);
|
||||
virtual void Detach(void) override;
|
||||
|
||||
/** Called by cClientHandle when the client is being destroyed.
|
||||
The player removes its m_ClientHandle ownership so that the ClientHandle gets deleted. */
|
||||
@ -642,7 +642,7 @@ protected:
|
||||
void ResolvePermissions(void);
|
||||
void ResolveGroups(void);
|
||||
|
||||
virtual void Destroyed(void);
|
||||
virtual void Destroyed(void) override;
|
||||
|
||||
/** Filters out damage for creative mode / friendly fire */
|
||||
virtual bool DoTakeDamage(TakeDamageInfo & TDI) override;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual void InitializeShapeGen(cIniFile & a_IniFile)
|
||||
virtual void InitializeShapeGen(cIniFile & a_IniFile) override
|
||||
{
|
||||
m_FrequencyX = static_cast<NOISE_DATATYPE>(a_IniFile.GetValueSetF("Generator", "TwoHeightsFrequencyX", 40));
|
||||
m_FrequencyY = static_cast<NOISE_DATATYPE>(a_IniFile.GetValueSetF("Generator", "TwoHeightsFrequencyY", 40));
|
||||
|
@ -259,13 +259,13 @@ protected:
|
||||
|
||||
|
||||
// cPiecePool overrides:
|
||||
virtual cPieces GetPiecesWithConnector(int a_ConnectorType)
|
||||
virtual cPieces GetPiecesWithConnector(int a_ConnectorType) override
|
||||
{
|
||||
return m_Prefabs.GetPiecesWithConnector(a_ConnectorType);
|
||||
}
|
||||
|
||||
|
||||
virtual cPieces GetStartingPieces(void)
|
||||
virtual cPieces GetStartingPieces(void) override
|
||||
{
|
||||
return m_Prefabs.GetStartingPieces();
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
void Clear(void);
|
||||
|
||||
/** Returns true iff the specified value exists. */
|
||||
bool HasValue(const AString & a_KeyName, const AString & a_ValueName) const;
|
||||
bool HasValue(const AString & a_KeyName, const AString & a_ValueName) const override;
|
||||
|
||||
/// Returns index of specified key, or noID if not found
|
||||
int FindKey(const AString & keyname) const;
|
||||
@ -101,7 +101,7 @@ public:
|
||||
int GetNumKeys(void) const { return (int)keys.size(); }
|
||||
|
||||
/// Add a key name
|
||||
int AddKeyName(const AString & keyname);
|
||||
int AddKeyName(const AString & keyname) override;
|
||||
|
||||
// Returns key names by index.
|
||||
AString GetKeyName(const int keyID) const;
|
||||
@ -117,7 +117,7 @@ public:
|
||||
// Gets value of [keyname] valuename =.
|
||||
// Overloaded to return string, int, and double.
|
||||
// Returns defValue if key / value not found.
|
||||
AString GetValue (const AString & keyname, const AString & valuename, const AString & defValue = "") const;
|
||||
AString GetValue (const AString & keyname, const AString & valuename, const AString & defValue = "") const override;
|
||||
AString GetValue (const int keyID, const int valueID, const AString & defValue = "") const;
|
||||
double GetValueF(const AString & keyname, const AString & valuename, const double defValue = 0) const;
|
||||
int GetValueI(const AString & keyname, const AString & valuename, const int defValue = 0) const;
|
||||
@ -127,18 +127,18 @@ public:
|
||||
}
|
||||
|
||||
// Gets the value; if not found, write the default to the INI file
|
||||
AString GetValueSet (const AString & keyname, const AString & valuename, const AString & defValue = "");
|
||||
AString GetValueSet (const AString & keyname, const AString & valuename, const AString & defValue = "") override;
|
||||
double GetValueSetF(const AString & keyname, const AString & valuename, const double defValue = 0.0);
|
||||
int GetValueSetI(const AString & keyname, const AString & valuename, const int defValue = 0);
|
||||
Int64 GetValueSetI(const AString & keyname, const AString & valuename, const Int64 defValue = 0);
|
||||
bool GetValueSetB(const AString & keyname, const AString & valuename, const bool defValue = false)
|
||||
int GetValueSetI(const AString & keyname, const AString & valuename, const int defValue = 0) override;
|
||||
Int64 GetValueSetI(const AString & keyname, const AString & valuename, const Int64 defValue = 0) override;
|
||||
bool GetValueSetB(const AString & keyname, const AString & valuename, const bool defValue = false) override
|
||||
{
|
||||
return (GetValueSetI(keyname, valuename, defValue ? 1 : 0) != 0);
|
||||
}
|
||||
|
||||
// Adds a new value to the specified key.
|
||||
// If a value of the same name already exists, creates another one (non-standard INI file)
|
||||
void AddValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value);
|
||||
void AddValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value) override;
|
||||
void AddValueI(const AString & a_KeyName, const AString & a_ValueName, const int a_Value);
|
||||
void AddValueB(const AString & a_KeyName, const AString & a_ValueName, const bool a_Value)
|
||||
{
|
||||
@ -151,8 +151,8 @@ public:
|
||||
// Returns true if value set, false otherwise.
|
||||
// Overloaded to accept string, int, and double.
|
||||
bool SetValue (const int keyID, const int valueID, const AString & value);
|
||||
bool SetValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value, const bool a_CreateIfNotExists = true);
|
||||
bool SetValueI(const AString & a_KeyName, const AString & a_ValueName, const int a_Value, const bool a_CreateIfNotExists = true);
|
||||
bool SetValue (const AString & a_KeyName, const AString & a_ValueName, const AString & a_Value, const bool a_CreateIfNotExists = true) override;
|
||||
bool SetValueI(const AString & a_KeyName, const AString & a_ValueName, const int a_Value, const bool a_CreateIfNotExists = true) override;
|
||||
bool SetValueI(const AString & a_Keyname, const AString & a_ValueName, const Int64 a_Value, const bool a_CreateIfNotExists = true);
|
||||
bool SetValueB(const AString & a_KeyName, const AString & a_ValueName, const bool a_Value, const bool a_CreateIfNotExists = true)
|
||||
{
|
||||
@ -163,7 +163,7 @@ public:
|
||||
// Deletes specified value.
|
||||
// Returns true if value existed and deleted, false otherwise.
|
||||
bool DeleteValueByID(const int keyID, const int valueID);
|
||||
bool DeleteValue(const AString & keyname, const AString & valuename);
|
||||
bool DeleteValue(const AString & keyname, const AString & valuename) override;
|
||||
|
||||
// Deletes specified key and all values contained within.
|
||||
// Returns true if key existed and deleted, false otherwise.
|
||||
@ -204,15 +204,15 @@ public:
|
||||
bool AddKeyComment(const int keyID, const AString & comment);
|
||||
|
||||
/// Add a key comment
|
||||
bool AddKeyComment(const AString & keyname, const AString & comment);
|
||||
bool AddKeyComment(const AString & keyname, const AString & comment) override;
|
||||
|
||||
/// Return a key comment
|
||||
AString GetKeyComment(const int keyID, const int commentID) const;
|
||||
AString GetKeyComment(const AString & keyname, const int commentID) const;
|
||||
AString GetKeyComment(const AString & keyname, const int commentID) const override;
|
||||
|
||||
// Delete a key comment.
|
||||
bool DeleteKeyComment(const int keyID, const int commentID);
|
||||
bool DeleteKeyComment(const AString & keyname, const int commentID);
|
||||
bool DeleteKeyComment(const AString & keyname, const int commentID) override;
|
||||
|
||||
// Delete all comments for a key.
|
||||
bool DeleteKeyComments(const int keyID);
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
cWorld & a_World, cPlayer & a_Player, const cItem & a_EquippedItem,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
int a_CursorX, int a_CursorY, int a_CursorZ
|
||||
)
|
||||
) override
|
||||
{
|
||||
// If the regular placement doesn't work, do no further processing:
|
||||
if (!super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
bool IsEating (void) const {return m_bIsEating; }
|
||||
bool IsRearing (void) const {return m_bIsRearing; }
|
||||
bool IsMthOpen (void) const {return m_bIsMouthOpen; }
|
||||
bool IsTame (void) const {return m_bIsTame; }
|
||||
bool IsTame (void) const override {return m_bIsTame; }
|
||||
int GetHorseType (void) const {return m_Type; }
|
||||
int GetHorseColor (void) const {return m_Color; }
|
||||
int GetHorseStyle (void) const {return m_Style; }
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
virtual void Attack(std::chrono::milliseconds a_Dt) override;
|
||||
|
||||
// Get functions
|
||||
bool IsSitting (void) const { return m_IsSitting; }
|
||||
bool IsTame (void) const { return m_IsTame; }
|
||||
bool IsSitting (void) const override { return m_IsSitting; }
|
||||
bool IsTame (void) const override { return m_IsTame; }
|
||||
bool IsBegging (void) const { return m_IsBegging; }
|
||||
bool IsAngry (void) const { return m_IsAngry; }
|
||||
AString GetOwnerName (void) const { return m_OwnerName; }
|
||||
|
@ -54,19 +54,19 @@ class cBlockingSslClientSocketLinkCallbacks:
|
||||
}
|
||||
|
||||
|
||||
virtual void OnReceivedData(const char * a_Data, size_t a_Length)
|
||||
virtual void OnReceivedData(const char * a_Data, size_t a_Length) override
|
||||
{
|
||||
m_Socket.OnReceivedData(a_Data, a_Length);
|
||||
}
|
||||
|
||||
|
||||
virtual void OnRemoteClosed(void)
|
||||
virtual void OnRemoteClosed(void) override
|
||||
{
|
||||
m_Socket.OnDisconnected();
|
||||
}
|
||||
|
||||
|
||||
virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg)
|
||||
virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) override
|
||||
{
|
||||
m_Socket.OnDisconnected();
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ protected:
|
||||
|
||||
|
||||
// cTCPLink::cCallbacks overrides:
|
||||
virtual void OnLinkCreated(cTCPLinkPtr a_Link);
|
||||
virtual void OnLinkCreated(cTCPLinkPtr a_Link) override;
|
||||
virtual void OnReceivedData(const char * a_Data, size_t a_Length) override;
|
||||
virtual void OnRemoteClosed(void) override;
|
||||
virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) override;
|
||||
|
@ -72,7 +72,7 @@ class cServerListenCallbacks:
|
||||
|
||||
virtual void OnAccepted(cTCPLink & a_Link) override {}
|
||||
|
||||
virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg)
|
||||
virtual void OnError(int a_ErrorCode, const AString & a_ErrorMsg) override
|
||||
{
|
||||
LOGWARNING("Cannot listen on port %d: %d (%s).", m_Port, a_ErrorCode, a_ErrorMsg.c_str());
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ public:
|
||||
|
||||
// cSlotAreaTemporary overrides:
|
||||
virtual void Clicked (cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override;
|
||||
virtual void DblClicked (cPlayer & a_Player, int a_SlotNum);
|
||||
virtual void DblClicked (cPlayer & a_Player, int a_SlotNum) override;
|
||||
virtual void OnPlayerRemoved(cPlayer & a_Player) override;
|
||||
virtual void SetSlot (int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override;
|
||||
|
||||
|
@ -150,7 +150,7 @@ protected:
|
||||
int m_LastReportChunkCount;
|
||||
|
||||
// cChunkCoordCallback override:
|
||||
virtual void Call(int a_ChunkX, int a_ChunkZ)
|
||||
virtual void Call(int a_ChunkX, int a_ChunkZ) override
|
||||
{
|
||||
// Check if this was the last chunk:
|
||||
m_NumPrepared += 1;
|
||||
|
@ -203,10 +203,10 @@ public:
|
||||
|
||||
bool VillagersShouldHarvestCrops(void) const { return m_VillagersShouldHarvestCrops; }
|
||||
|
||||
virtual eDimension GetDimension(void) const { return m_Dimension; }
|
||||
virtual eDimension GetDimension(void) const override { return m_Dimension; }
|
||||
|
||||
/** Returns the world height at the specified coords; waits for the chunk to get loaded / generated */
|
||||
virtual int GetHeight(int a_BlockX, int a_BlockZ);
|
||||
virtual int GetHeight(int a_BlockX, int a_BlockZ) override;
|
||||
|
||||
// tolua_end
|
||||
|
||||
@ -253,7 +253,7 @@ public:
|
||||
void BroadcastScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
||||
void BroadcastScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
|
||||
void BroadcastDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
|
||||
void BroadcastSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr); // tolua_export
|
||||
void BroadcastSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr) override; // tolua_export
|
||||
void BroadcastSoundParticleEffect (int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = nullptr); // tolua_export
|
||||
void BroadcastSpawnEntity (cEntity & a_Entity, const cClientHandle * a_Exclude = nullptr);
|
||||
void BroadcastTeleportEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = nullptr);
|
||||
@ -788,7 +788,7 @@ public:
|
||||
bool IsWeatherWet(void) const { return !IsWeatherSunny(); }
|
||||
|
||||
/** Returns true if it is raining, stormy or snowing at the specified location. This takes into account biomes. */
|
||||
virtual bool IsWeatherWetAt(int a_BlockX, int a_BlockZ)
|
||||
virtual bool IsWeatherWetAt(int a_BlockX, int a_BlockZ) override
|
||||
{
|
||||
return (IsWeatherWet() && !IsBiomeNoDownfall(GetBiomeAt(a_BlockX, a_BlockZ)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user