Skip to content

Commit c28654e

Browse files
author
Marc Geilen
committed
small refactoring
1 parent 436499b commit c28654e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

include/maxplus/base/fsm/fsm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,11 @@ template <typename StateLabelType, typename EdgeLabelType> class Edge : public A
329329
Abstract::Edge(src, dst), label(lbl) {
330330
}
331331

332+
[[nodiscard]] const EdgeLabelType &getLabel() const { return this->label; }
333+
334+
private:
332335
EdgeLabelType label;
336+
333337
};
334338

335339
// template <typename StateLabelType, typename EdgeLabelType>

include/maxplus/game/mpgameautomaton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ class MaxPlusGameAutomatonWithRewards : public MaxPlusAutomatonWithRewards,
6969

7070
void addV1(MPARState *s) { this->setV1.insert(s); }
7171

72-
MPTime getWeight1(const MPAREdge *e) const override { return MPTime(e->label.reward); }
72+
MPTime getWeight1(const MPAREdge *e) const override { return MPTime(e->getLabel().reward); }
7373

74-
MPTime getWeight2(const MPAREdge *e) const override { return e->label.delay; }
74+
MPTime getWeight2(const MPAREdge *e) const override { return e->getLabel().delay; }
7575

7676
private:
7777
std::set<MPARState *> setV0;

0 commit comments

Comments
 (0)