mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-22 21:02:07 +00:00
chore: use nodiscard whenever applicable
This commit is contained in:
@@ -34,8 +34,8 @@ namespace BSP
|
||||
std::vector<std::shared_ptr<BSPObject>> objectList;
|
||||
|
||||
void addObject(std::shared_ptr<BSPObject> object);
|
||||
BSPObject* getObject(size_t index) const;
|
||||
size_t getObjectCount() const;
|
||||
[[nodiscard]] BSPObject* getObject(size_t index) const;
|
||||
[[nodiscard]] size_t getObjectCount() const;
|
||||
};
|
||||
|
||||
class BSPTree;
|
||||
@@ -50,7 +50,7 @@ namespace BSP
|
||||
float distance; // distance from the origin (0, 0, 0) to the plane
|
||||
|
||||
BSPNode(std::unique_ptr<BSPTree> frontTree, std::unique_ptr<BSPTree> backTree, PlaneAxis nodeAxis, float nodeDistance);
|
||||
PlaneSide objectIsInFront(const BSPObject& object) const;
|
||||
[[nodiscard]] PlaneSide objectIsInFront(const BSPObject& object) const;
|
||||
};
|
||||
|
||||
class BSPTree
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace BSP
|
||||
public:
|
||||
BSPLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
|
||||
bool linkBSP(const BSPData& bsp) const;
|
||||
[[nodiscard]] bool linkBSP(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
T6::FootstepTableDef* addEmptyFootstepTableAsset(const std::string& assetName) const;
|
||||
bool addDefaultRequiredAssets(const BSPData& bsp) const;
|
||||
[[nodiscard]] bool addDefaultRequiredAssets(const BSPData& bsp) const;
|
||||
|
||||
MemoryManager& m_memory;
|
||||
ISearchPath& m_search_path;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace BSP
|
||||
public:
|
||||
ClipMapLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
|
||||
T6::clipMap_t* linkClipMap(const BSPData& bsp);
|
||||
[[nodiscard]] T6::clipMap_t* linkClipMap(const BSPData& bsp);
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BSP
|
||||
{
|
||||
public:
|
||||
ComWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
T6::ComWorld* linkComWorld(const BSPData& bsp) const;
|
||||
[[nodiscard]] T6::ComWorld* linkComWorld(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BSP
|
||||
{
|
||||
public:
|
||||
GameWorldMpLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
T6::GameWorldMp* linkGameWorldMp(const BSPData& bsp) const;
|
||||
[[nodiscard]] T6::GameWorldMp* linkGameWorldMp(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BSP
|
||||
{
|
||||
public:
|
||||
GfxWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
T6::GfxWorld* linkGfxWorld(const BSPData& bsp) const;
|
||||
[[nodiscard]] T6::GfxWorld* linkGfxWorld(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BSP
|
||||
{
|
||||
public:
|
||||
MapEntsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
T6::MapEnts* linkMapEnts(const BSPData& bsp) const;
|
||||
[[nodiscard]] T6::MapEnts* linkMapEnts(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BSP
|
||||
{
|
||||
public:
|
||||
SkinnedVertsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||
T6::SkinnedVertsDef* linkSkinnedVerts(const BSPData& bsp) const;
|
||||
[[nodiscard]] T6::SkinnedVertsDef* linkSkinnedVerts(const BSPData& bsp) const;
|
||||
|
||||
private:
|
||||
MemoryManager& m_memory;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace
|
||||
{
|
||||
}
|
||||
|
||||
std::optional<asset_type_t> GetHandlingAssetType() const override
|
||||
[[nodiscard]] std::optional<asset_type_t> GetHandlingAssetType() const override
|
||||
{
|
||||
// don't handle any asset types
|
||||
return std::nullopt;
|
||||
|
||||
Reference in New Issue
Block a user