From d57a0c9901ca75d287ac68d3662badc777ae5c9f Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 17 Apr 2014 18:41:36 +0200 Subject: [PATCH] Replaced memcpy by std::copy. Former-commit-id: ef31cf99772064aa660ee1acfc7ab05037b8087a --- src/storage/dd/CuddDd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/dd/CuddDd.cpp b/src/storage/dd/CuddDd.cpp index c5fb92bbd..7ea5ab260 100644 --- a/src/storage/dd/CuddDd.cpp +++ b/src/storage/dd/CuddDd.cpp @@ -388,14 +388,14 @@ namespace storm { std::vector ddNames; std::string ddName("f"); ddNames.push_back(new char[ddName.size() + 1]); - memcpy(ddNames.back(), ddName.c_str(), 2); + std::copy(ddName.c_str(), ddName.c_str() + 2, ddNames.back()); // Now build the variables names. std::vector ddVariableNamesAsStrings = this->getDdManager()->getDdVariableNames(); std::vector ddVariableNames; for (auto const& element : ddVariableNamesAsStrings) { ddVariableNames.push_back(new char[element.size() + 1]); - memcpy(ddVariableNames.back(), element.c_str(), element.size() + 1); + std::copy(element.c_str(), element.c_str() + element.size() + 1, ddVariableNames.back()); } // Open the file, dump the DD and close it again.