Browse Source

Fixed compile warnings

Former-commit-id: 62ef59c239
tempestpy_adaptions
Mavo 9 years ago
parent
commit
4c1d71fc91
  1. 12
      src/storage/dft/DFTBuilder.cpp
  2. 12
      src/storage/dft/DFTElements.h
  3. 2
      src/storage/dft/DFTState.cpp

12
src/storage/dft/DFTBuilder.cpp

@ -5,6 +5,8 @@
#include "DFT.h"
#include <algorithm>
#include "OrderDFTElementsById.h"
#include <src/utility/macros.h>
#include <src/exceptions/NotSupportedException.h>
#include "../../exceptions/WrongFormatException.h"
@ -86,6 +88,16 @@ namespace storm {
case DFTElementTypes::SPARE:
element = std::make_shared<DFTSpare>(mNextId++, name);
break;
case DFTElementTypes::BE:
case DFTElementTypes::VOT:
// Handled separately
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Gate type handled separately.");
case DFTElementTypes::CONSTF:
case DFTElementTypes::CONSTS:
case DFTElementTypes::FDEP:
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Gate type not supported.");
default:
STORM_LOG_THROW(false, storm::exceptions::NotSupportedException, "Gate type not known.");
}
mElements[name] = element;
mChildNames[element] = children;

12
src/storage/dft/DFTElements.h

@ -145,7 +145,7 @@ namespace storm {
return mChildren.push_back(elem);
}
size_t nrChildren() const {
size_t nrChildren() const override {
return mChildren.size();
}
@ -153,7 +153,7 @@ namespace storm {
return mChildren;
}
virtual bool isGate() const {
virtual bool isGate() const override {
return true;
}
@ -172,7 +172,7 @@ namespace storm {
}
}
virtual std::vector<size_t> independentUnit() const {
virtual std::vector<size_t> independentUnit() const override {
std::set<size_t> unit = {mId};
for(auto const& child : mChildren) {
child->extendUnit(unit);
@ -187,7 +187,7 @@ namespace storm {
virtual void print(std::ostream& os = std::cout) const {
virtual void print(std::ostream& os = std::cout) const override {
os << "{" << name() << "} " << typestring() << "( ";
std::vector<std::shared_ptr<DFTElement>>::const_iterator it = mChildren.begin();
os << (*it)->name();
@ -199,7 +199,7 @@ namespace storm {
os << ")";
}
virtual bool checkDontCareAnymore(storm::storage::DFTState& state, DFTStateSpaceGenerationQueues& queues) const {
virtual bool checkDontCareAnymore(storm::storage::DFTState& state, DFTStateSpaceGenerationQueues& queues) const override {
if(DFTElement::checkDontCareAnymore(state, queues)) {
childrenDontCare(state, queues);
return true;
@ -207,7 +207,7 @@ namespace storm {
return false;
}
virtual void extendUnit(std::set<size_t>& unit) const {
virtual void extendUnit(std::set<size_t>& unit) const override {
DFTElement::extendUnit(unit);
for(auto const& child : mChildren) {
child->extendUnit(unit);

2
src/storage/dft/DFTState.cpp

@ -5,7 +5,7 @@
namespace storm {
namespace storage {
DFTState::DFTState(DFT const& dft, size_t id) : mStatus(dft.stateSize()), mDft(dft), mId(id) {
DFTState::DFTState(DFT const& dft, size_t id) : mStatus(dft.stateSize()), mId(id), mDft(dft) {
mInactiveSpares = dft.getSpareIndices();
dft.initializeUses(*this);
dft.initializeActivation(*this);

Loading…
Cancel
Save