added more noexcept

This commit is contained in:
2025-05-05 02:24:23 +03:00
parent 50ddf2d31e
commit 5489c296e9
4 changed files with 15 additions and 14 deletions

View File

@@ -15,16 +15,16 @@ namespace omath::pathfinding
public:
[[nodiscard]]
static std::vector<Vector3<float>> find_path(const Vector3<float>& start, const Vector3<float>& end,
const NavigationMesh& nav_mesh);
const NavigationMesh& nav_mesh) noexcept;
private:
[[nodiscard]]
static std::vector<Vector3<float>>
reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
const Vector3<float>& current);
const Vector3<float>& current) noexcept;
[[nodiscard]]
static auto get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
const Vector3<float>& end_vertex);
const Vector3<float>& end_vertex) noexcept;
};
} // namespace omath::pathfinding

View File

@@ -20,17 +20,17 @@ namespace omath::pathfinding
{
public:
[[nodiscard]]
std::expected<Vector3<float>, std::string> get_closest_vertex(const Vector3<float>& point) const;
std::expected<Vector3<float>, std::string> get_closest_vertex(const Vector3<float>& point) const noexcept;
[[nodiscard]]
const std::vector<Vector3<float>>& get_neighbors(const Vector3<float>& vertex) const;
const std::vector<Vector3<float>>& get_neighbors(const Vector3<float>& vertex) const noexcept;
[[nodiscard]]
bool empty() const;
[[nodiscard]] std::vector<uint8_t> serialize() const;
[[nodiscard]] std::vector<uint8_t> serialize() const noexcept;
void deserialize(const std::vector<uint8_t>& raw);
void deserialize(const std::vector<uint8_t>& raw) noexcept;
std::unordered_map<Vector3<float>, std::vector<Vector3<float>>> m_vertex_map;
};