Skip to content

Commit d8e0d68

Browse files
committed
fixed a few minor inconsistencies
1 parent 958c727 commit d8e0d68

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

include/graph/graph.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace xmotion {
7070
* **Vertex Operations (Strong Guarantee)**
7171
* - AddVertex(): Strong guarantee - vertex fully added or graph unchanged
7272
* - RemoveVertex(): Strong guarantee - vertex fully removed or graph unchanged
73-
* - FindVertex(): No-throw for valid inputs, throws std::out_of_range for invalid IDs
73+
* - FindVertex(): No-throw for valid inputs, throws ElementNotFoundError for invalid IDs
7474
*
7575
* **Edge Operations (Strong Guarantee)**
7676
* - AddEdge(): Strong guarantee - edge fully added or graph unchanged
@@ -100,8 +100,8 @@ namespace xmotion {
100100
* @section error_conditions Error Conditions and Exceptions
101101
*
102102
* **std::bad_alloc**: Memory allocation failures (from std::unordered_map or std::unique_ptr)
103-
* **std::invalid_argument**: Invalid input parameters (e.g., in tree operations)
104-
* **std::logic_error**: Violation of class invariants (e.g., tree structure violations)
103+
* **InvalidArgumentError**: Invalid input parameters (e.g., in tree operations)
104+
* **StructureViolationError**: Violation of class invariants (e.g., tree structure violations)
105105
* **State copy constructor exceptions**: Propagated with strong guarantee via RAII
106106
*
107107
* @section thread_safety_exceptions Thread Safety and Exceptions

include/graph/impl/default_indexer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*
2828
*/
2929

30-
#ifndef STATE_INDEXER_HPP
31-
#define STATE_INDEXER_HPP
30+
#ifndef DEFAULT_INDEXER_HPP
31+
#define DEFAULT_INDEXER_HPP
3232

3333
#include <type_traits>
3434
#include <memory>

include/graph/impl/graph_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Graph<State, Transition, StateIndexer>::ObtainVertexFromVertexMap(State state) {
241241
if (it == vertex_map_.end()) {
242242
// Exception-safe vertex creation using unique_ptr with move semantics
243243
std::unique_ptr<Vertex> new_vertex(new Vertex(std::move(state), state_id));
244-
new_vertex->search_parent = vertex_end();
244+
// Note: search_parent initialization removed - field is deprecated
245245
auto result = vertex_map_.insert(std::make_pair(state_id, std::move(new_vertex)));
246246
return vertex_iterator(result.first);
247247
}

include/graph/tree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ namespace xmotion {
6464
* - AddRoot(): Strong guarantee - root added or tree unchanged
6565
* - AddEdge(): Strong guarantee - maintains tree structure invariants
6666
* - RemoveSubtree(): Strong guarantee - subtree fully removed or unchanged
67-
* - GetParentVertex(): Throws std::invalid_argument if vertex not found,
68-
* std::logic_error if tree invariant violated
67+
* - GetParentVertex(): Throws ElementNotFoundError if vertex not found,
68+
* StructureViolationError if tree invariant violated
6969
*
7070
* **Tree Query Operations (No-throw Guarantee)**
7171
* - GetRootVertex(): No-throw - returns end() if no root

0 commit comments

Comments
 (0)