mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 05:12:05 +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;
|
std::vector<std::shared_ptr<BSPObject>> objectList;
|
||||||
|
|
||||||
void addObject(std::shared_ptr<BSPObject> object);
|
void addObject(std::shared_ptr<BSPObject> object);
|
||||||
BSPObject* getObject(size_t index) const;
|
[[nodiscard]] BSPObject* getObject(size_t index) const;
|
||||||
size_t getObjectCount() const;
|
[[nodiscard]] size_t getObjectCount() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BSPTree;
|
class BSPTree;
|
||||||
@@ -50,7 +50,7 @@ namespace BSP
|
|||||||
float distance; // distance from the origin (0, 0, 0) to the plane
|
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);
|
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
|
class BSPTree
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ namespace BSP
|
|||||||
public:
|
public:
|
||||||
BSPLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
BSPLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
|
|
||||||
bool linkBSP(const BSPData& bsp) const;
|
[[nodiscard]] bool linkBSP(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T6::FootstepTableDef* addEmptyFootstepTableAsset(const std::string& assetName) const;
|
T6::FootstepTableDef* addEmptyFootstepTableAsset(const std::string& assetName) const;
|
||||||
bool addDefaultRequiredAssets(const BSPData& bsp) const;
|
[[nodiscard]] bool addDefaultRequiredAssets(const BSPData& bsp) const;
|
||||||
|
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
ISearchPath& m_search_path;
|
ISearchPath& m_search_path;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace BSP
|
|||||||
public:
|
public:
|
||||||
ClipMapLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
ClipMapLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
|
|
||||||
T6::clipMap_t* linkClipMap(const BSPData& bsp);
|
[[nodiscard]] T6::clipMap_t* linkClipMap(const BSPData& bsp);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace BSP
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ComWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
ComWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
T6::ComWorld* linkComWorld(const BSPData& bsp) const;
|
[[nodiscard]] T6::ComWorld* linkComWorld(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace BSP
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GameWorldMpLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
GameWorldMpLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
T6::GameWorldMp* linkGameWorldMp(const BSPData& bsp) const;
|
[[nodiscard]] T6::GameWorldMp* linkGameWorldMp(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace BSP
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GfxWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
GfxWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
T6::GfxWorld* linkGfxWorld(const BSPData& bsp) const;
|
[[nodiscard]] T6::GfxWorld* linkGfxWorld(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace BSP
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MapEntsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
MapEntsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
T6::MapEnts* linkMapEnts(const BSPData& bsp) const;
|
[[nodiscard]] T6::MapEnts* linkMapEnts(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
MemoryManager& m_memory;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace BSP
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SkinnedVertsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
SkinnedVertsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
|
||||||
T6::SkinnedVertsDef* linkSkinnedVerts(const BSPData& bsp) const;
|
[[nodiscard]] T6::SkinnedVertsDef* linkSkinnedVerts(const BSPData& bsp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MemoryManager& m_memory;
|
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
|
// don't handle any asset types
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|||||||
Reference in New Issue
Block a user