diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fc1a8305..b96fa43db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,6 +158,9 @@ target_link_libraries(storm-tests ${Boost_LIBRARIES}) set (STORM_USE_COTIRE ON) if (APPLE) set(STORM_USE_COTIRE OFF) + + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") endif(APPLE) # Print Cotire Usage Status diff --git a/src/models/Dtmc.h b/src/models/Dtmc.h index 608bb204e..41e6bae8a 100644 --- a/src/models/Dtmc.h +++ b/src/models/Dtmc.h @@ -62,7 +62,7 @@ public: * Copy Constructor. Performs a deep copy of the given DTMC. * @param dtmc A reference to the DTMC that is to be copied. */ - Dtmc(const Dtmc &dtmc) : AbstractDeterministicModel(dtmc) { + Dtmc(Dtmc const& dtmc) : AbstractDeterministicModel(dtmc) { // Intentionally left empty. } @@ -95,7 +95,7 @@ private: return false; } - for (uint_fast64_t row = 0; row < this->getTransitionMatrix()->getRowCount(); row++) { + for (uint_fast64_t row = 0; row < this->getTransitionMatrix()->getRowCount(); ++row) { T sum = this->getTransitionMatrix()->getRowSum(row); if (sum == 0) { LOG4CPLUS_ERROR(logger, "Row " << row << " has sum 0"); diff --git a/src/storage/SparseMatrix.h b/src/storage/SparseMatrix.h index 5f76ede9b..c24dcb36b 100644 --- a/src/storage/SparseMatrix.h +++ b/src/storage/SparseMatrix.h @@ -1005,7 +1005,7 @@ public: * @returns An iterator that points to the first element after the matrix. */ ConstValueIterator constValueIteratorEnd(uint_fast64_t row) const { - return &(this->valueStorage[0]) + this->rowIndications[row]; + return &(this->valueStorage[0]) + this->rowIndications[row + 1]; } /*! @@ -1071,7 +1071,7 @@ public: * given, rows of different groups will be separated by a dashed line. * @returns A (non-compressed) string representation of the matrix. */ - std::string toString(std::vector const* rowGroupIndices) const { + std::string toString(std::vector const* rowGroupIndices = nullptr) const { std::stringstream result; uint_fast64_t currentNondeterministicChoiceIndex = 0;