refactor(Core): apply clang-tidy modernize-use-nodiscard (#3835)
This commit is contained in:
@@ -40,17 +40,17 @@ class GameObjectModel /*, public Intersectable*/
|
||||
public:
|
||||
std::string name;
|
||||
|
||||
const G3D::AABox& getBounds() const { return iBound; }
|
||||
[[nodiscard]] const G3D::AABox& getBounds() const { return iBound; }
|
||||
|
||||
~GameObjectModel();
|
||||
|
||||
const G3D::Vector3& getPosition() const { return iPos;}
|
||||
[[nodiscard]] const G3D::Vector3& getPosition() const { return iPos;}
|
||||
|
||||
/** Enables\disables collision. */
|
||||
void disable() { phasemask = 0;}
|
||||
void enable(uint32 ph_mask) { phasemask = ph_mask;}
|
||||
|
||||
bool isEnabled() const {return phasemask != 0;}
|
||||
[[nodiscard]] bool isEnabled() const {return phasemask != 0;}
|
||||
|
||||
bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace VMAP
|
||||
bool operator==(const ModelSpawn& other) const { return ID == other.ID; }
|
||||
//uint32 hashCode() const { return ID; }
|
||||
// temp?
|
||||
const G3D::AABox& getBounds() const { return iBound; }
|
||||
[[nodiscard]] const G3D::AABox& getBounds() const { return iBound; }
|
||||
|
||||
static bool readFromFile(FILE* rf, ModelSpawn& spawn);
|
||||
static bool writeToFile(FILE* rw, const ModelSpawn& spawn);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace VMAP
|
||||
~WmoLiquid();
|
||||
WmoLiquid& operator=(const WmoLiquid& other);
|
||||
bool GetLiquidHeight(const G3D::Vector3& pos, float& liqHeight) const;
|
||||
uint32 GetType() const { return iType; }
|
||||
[[nodiscard]] uint32 GetType() const { return iType; }
|
||||
float* GetHeightStorage() { return iHeight; }
|
||||
uint8* GetFlagsStorage() { return iFlags; }
|
||||
uint32 GetFileSize();
|
||||
@@ -74,12 +74,12 @@ namespace VMAP
|
||||
bool IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit) const;
|
||||
bool IsInsideObject(const G3D::Vector3& pos, const G3D::Vector3& down, float& z_dist) const;
|
||||
bool GetLiquidLevel(const G3D::Vector3& pos, float& liqHeight) const;
|
||||
uint32 GetLiquidType() const;
|
||||
[[nodiscard]] uint32 GetLiquidType() const;
|
||||
bool writeToFile(FILE* wf);
|
||||
bool readFromFile(FILE* rf);
|
||||
const G3D::AABox& GetBound() const { return iBound; }
|
||||
uint32 GetMogpFlags() const { return iMogpFlags; }
|
||||
uint32 GetWmoID() const { return iGroupWMOID; }
|
||||
[[nodiscard]] const G3D::AABox& GetBound() const { return iBound; }
|
||||
[[nodiscard]] uint32 GetMogpFlags() const { return iMogpFlags; }
|
||||
[[nodiscard]] uint32 GetWmoID() const { return iGroupWMOID; }
|
||||
protected:
|
||||
G3D::AABox iBound;
|
||||
uint32 iMogpFlags;// 0x8 outdor; 0x2000 indoor
|
||||
|
||||
Reference in New Issue
Block a user