adjacency_matrix: correctly initialize members

This commit is contained in:
Michele Caini
2024-06-04 09:41:38 +02:00
parent cb8f695584
commit ac8369d393

View File

@@ -114,15 +114,14 @@ public:
using graph_category = Category;
/*! @brief Default constructor. */
adjacency_matrix() noexcept(noexcept(allocator_type{}))
: adjacency_matrix{0u} {}
adjacency_matrix() noexcept(noexcept(allocator_type{})) = default;
/**
* @brief Constructs an empty container with a given allocator.
* @param allocator The allocator to use.
*/
explicit adjacency_matrix(const allocator_type &allocator) noexcept
: adjacency_matrix{0u, allocator} {}
: matrix{allocator} {}
/**
* @brief Constructs an empty container with a given allocator and user
@@ -325,8 +324,8 @@ public:
}
private:
container_type matrix;
size_type vert;
container_type matrix{};
size_type vert{};
};
} // namespace entt