From 7b1d7507c48c440b1543baed792826855b6c23b3 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Tue, 20 Nov 2018 22:55:54 +0100 Subject: [PATCH] simplified a constructor for assignments for simpler code --- src/storm/storage/jani/Assignment.cpp | 4 ++++ src/storm/storage/jani/Assignment.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/storm/storage/jani/Assignment.cpp b/src/storm/storage/jani/Assignment.cpp index 3235eacfe..2d90b6329 100644 --- a/src/storm/storage/jani/Assignment.cpp +++ b/src/storm/storage/jani/Assignment.cpp @@ -14,6 +14,10 @@ namespace storm { Assignment::Assignment(storm::jani::LValue const& lValue, storm::expressions::Expression const& expression, int64_t level) : lValue(lValue), expression(expression), level(level) { // Intentionally left empty } + + Assignment::Assignment(storm::jani::Variable const& lValue, storm::expressions::Expression const& expression, int64_t level) : lValue(lValue), expression(expression), level(level) { + // Intentionally left empty + } bool Assignment::operator==(Assignment const& other) const { return this->isTransient() == other.isTransient() && this->getLValue() == other.getLValue() && this->getAssignedExpression().isSyntacticallyEqual(other.getAssignedExpression()) && this->getLevel() == other.getLevel(); diff --git a/src/storm/storage/jani/Assignment.h b/src/storm/storage/jani/Assignment.h index ac616cd39..0c60e961e 100644 --- a/src/storm/storage/jani/Assignment.h +++ b/src/storm/storage/jani/Assignment.h @@ -15,6 +15,11 @@ namespace storm { */ Assignment(storm::jani::LValue const& lValue, storm::expressions::Expression const& expression, int64_t level = 0); + /*! + * Creates an assignment of the given expression to the given Variable. + */ + Assignment(storm::jani::Variable const& lValue, storm::expressions::Expression const&, int64_t level = 0); + Assignment(Assignment const&) = default; bool operator==(Assignment const& other) const;