diff --git a/include/cereal/types/memory.hpp b/include/cereal/types/memory.hpp index 1cb981b7..59e9da9b 100644 --- a/include/cereal/types/memory.hpp +++ b/include/cereal/types/memory.hpp @@ -152,7 +152,8 @@ namespace cereal { if( !itsRestored ) { - std::memcpy( itsPtr, &itsState, sizeof(ParentType) ); + // void * cast needed when type has no trivial copy-assignment + std::memcpy( static_cast(itsPtr), &itsState, sizeof(ParentType) ); itsRestored = true; } } diff --git a/scripts/updatecoverage.sh b/scripts/updatecoverage.sh index a3ec4adf..f169f49c 100755 --- a/scripts/updatecoverage.sh +++ b/scripts/updatecoverage.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Updates the coverage documentation, and copies it into the appropriate place -# in the gh-pages-develop branch. +# in the gh-pages branch. # $1 from CMAKE will contain the root directory of cereal # this requires lcov 1.10 or newer @@ -21,11 +21,11 @@ for f in $COVERAGE_TESTS tempdir=`mktemp -d` lcov --capture --directory $1 --output-file coverage.info --no-external -lcov --remove coverage.info '*/external/*' 'cereal/details/util.hpp' 'sandbox/*' 'unittests/*' -o coverage.info +lcov --remove coverage.info '*/external/*' '*/cereal/details/util.hpp' 'sandbox/*' '*/unittests/*' -o coverage.info genhtml --demangle-cpp coverage.info --output-directory ${tempdir} # copy over to gh pages -git checkout gh-pages-develop +git checkout gh-pages rm -rf $1/assets/coverage mkdir $1/assets/coverage