Skip to content

Commit 8312a2c

Browse files
committed
added some const
1 parent 3896335 commit 8312a2c

File tree

1 file changed

+3
-3
lines changed
  • include/maxplus/base/fsm

1 file changed

+3
-3
lines changed

include/maxplus/base/fsm/fsm.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class DepthFirstSearch {
266266

267267
virtual void onSimpleCycle(DfsStack &stack){};
268268

269-
explicit DepthFirstSearch(FiniteStateMachine &targetFsm) : fsm(targetFsm){};
269+
explicit DepthFirstSearch(const FiniteStateMachine &targetFsm) : fsm(targetFsm){};
270270

271271
// Execute the depth first search
272272
void DoDepthFirstSearch(const StateRef &startingState, bool fullDFS = false) {
@@ -319,15 +319,15 @@ class DepthFirstSearch {
319319
}
320320

321321
protected:
322-
FiniteStateMachine &fsm;
322+
const FiniteStateMachine &fsm;
323323
};
324324

325325
// Check for cycles
326326
class DetectCycle : public DepthFirstSearch {
327327
public:
328328
bool hasCycle = false;
329329

330-
explicit DetectCycle(FiniteStateMachine &targetFsm) : DepthFirstSearch(targetFsm){};
330+
explicit DetectCycle(const FiniteStateMachine &targetFsm) : DepthFirstSearch(targetFsm){};
331331

332332
~DetectCycle() override = default;
333333

0 commit comments

Comments
 (0)