From 972ef8b14cf72c9883deffe54a4f7038b391a505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Basg=C3=B6ze?= Date: Thu, 25 Feb 2021 15:08:14 +0100 Subject: [PATCH] Break inclusion loop in DFT.h and comment magic numbers in RelevantEvents.h --- src/storm-dft/storage/dft/DFT.cpp | 1 + src/storm-dft/storage/dft/DFT.h | 6 ++++-- src/storm-dft/utility/RelevantEvents.h | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/storm-dft/storage/dft/DFT.cpp b/src/storm-dft/storage/dft/DFT.cpp index 86a99290c..5496e5476 100644 --- a/src/storm-dft/storage/dft/DFT.cpp +++ b/src/storm-dft/storage/dft/DFT.cpp @@ -10,6 +10,7 @@ #include "storm-dft/builder/DFTBuilder.h" #include "storm-dft/storage/dft/DFTIsomorphism.h" +#include "storm-dft/utility/RelevantEvents.h" namespace storm { diff --git a/src/storm-dft/storage/dft/DFT.h b/src/storm-dft/storage/dft/DFT.h index f089c8ae5..db0704ee9 100644 --- a/src/storm-dft/storage/dft/DFT.h +++ b/src/storm-dft/storage/dft/DFT.h @@ -17,13 +17,15 @@ #include "storm-dft/storage/dft/SymmetricUnits.h" #include "storm-dft/storage/dft/DFTStateGenerationInfo.h" #include "storm-dft/storage/dft/DFTLayoutInfo.h" -#include "storm-dft/utility/RelevantEvents.h" namespace storm { + // Forward declarations namespace builder { - // Forward declaration template class DFTBuilder; } + namespace utility { + class RelevantEvents; + } namespace storage { diff --git a/src/storm-dft/utility/RelevantEvents.h b/src/storm-dft/utility/RelevantEvents.h index f32f348c8..4e07d4e26 100644 --- a/src/storm-dft/utility/RelevantEvents.h +++ b/src/storm-dft/utility/RelevantEvents.h @@ -57,8 +57,10 @@ namespace storm { } else { // Get name of event if (boost::ends_with(label, "_failed")) { + // length of "_failed" = 7 this->addEvent(label.substr(0, label.size() - 7)); } else if (boost::ends_with(label, "_dc")) { + // length of "_dc" = 3 this->addEvent(label.substr(0, label.size() - 3)); } else if (label.find("_claimed_") != std::string::npos) { STORM_LOG_THROW(storm::settings::getModule().isAddLabelsClaiming(), storm::exceptions::InvalidArgumentException, "Claiming labels will not be exported but are required for label '" << label << "'. Try setting --labels-claiming.");