@@ -152,9 +152,7 @@ class State : public WithUniqueID {
152152 }
153153
154154 // as a reference
155- [[nodiscard]] virtual const StateRef getReference () const {
156- return this ;
157- }
155+ [[nodiscard]] virtual const StateRef getReference () const { return this ; }
158156
159157 void insertOutgoingEdge (Edge &e) { this ->outgoingEdges .insert (&e); }
160158
@@ -215,7 +213,6 @@ class FiniteStateMachine {
215213 [[nodiscard]] virtual const SetOfStates &getStates () const = 0;
216214};
217215
218-
219216//
220217// A generic DFS strategy on the target FSM
221218// overwrite the methods onEnterState, onLeaveState, onTransition and onSimpleCycle with
@@ -339,9 +336,7 @@ class DetectCycle : public DepthFirstSearch {
339336 DetectCycle (DetectCycle &&) = delete ;
340337 DetectCycle &operator =(DetectCycle &&) = delete ;
341338
342- bool checkForCycles () {
343- return this ->checkForCycles (nullptr );
344- }
339+ bool checkForCycles () { return this ->checkForCycles (nullptr ); }
345340
346341 bool checkForCycles (ListOfStateRefs *cycle) {
347342 this ->visitedStates .clear ();
@@ -353,7 +348,9 @@ class DetectCycle : public DepthFirstSearch {
353348 if (this ->hasCycle ) {
354349 return true ;
355350 }
356- while (nextStartingState != states.end () && this ->visitedStates .includesState ((*nextStartingState).second ->getReference ())) {
351+ while (nextStartingState != states.end ()
352+ && this ->visitedStates .includesState (
353+ (*nextStartingState).second ->getReference ())) {
357354 nextStartingState++;
358355 }
359356 }
@@ -364,9 +361,7 @@ class DetectCycle : public DepthFirstSearch {
364361 SetOfStateRefs visitedStates;
365362 ListOfStateRefs *cycle = nullptr ;
366363
367- void onEnterState (StateRef s) override {
368- this ->visitedStates .insert (s);
369- }
364+ void onEnterState (StateRef s) override { this ->visitedStates .insert (s); }
370365
371366 void onSimpleCycle (DfsStack &stack) override {
372367 if (!this ->hasCycle ) {
0 commit comments