From 64f644135d9fb56b4e07b6e3b6f1379ab3519d60 Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Mon, 27 Aug 2018 13:59:00 +0200 Subject: [PATCH] [BUGFIX] wrong usage of sizeof --- src/core/Conversion.cpp | 2 +- tests/core/math/GenericAABBTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Conversion.cpp b/src/core/Conversion.cpp index 9e83f098d..515e573fa 100644 --- a/src/core/Conversion.cpp +++ b/src/core/Conversion.cpp @@ -47,7 +47,7 @@ void convert(const std::vector<bool> & from, std::vector<uint8_t> & to) void convert(const std::vector<uint8_t> & from, std::vector<bool> & to) { to.clear(); - to.resize(from.size() * sizeof(8)); + to.resize(from.size() * sizeof(uint8_t) * 8); auto unpackIt = from.begin(); auto it = to.begin(); diff --git a/tests/core/math/GenericAABBTest.cpp b/tests/core/math/GenericAABBTest.cpp index e78e6890d..d574ba153 100644 --- a/tests/core/math/GenericAABBTest.cpp +++ b/tests/core/math/GenericAABBTest.cpp @@ -364,7 +364,7 @@ void testConstructors( const T x0, const T y0, const T z0, const T x1, const T y { GenericAABB< T > toBeCopied( x0, y0, z0, x1, y1, z1 ); - const GenericAABB< T > refAABB( toBeCopied ); + const GenericAABB< T > refAABB( toBeCopied ); // NOLINT WALBERLA_CHECK_IDENTICAL( refAABB.minCorner()[0], std::min( x0, x1 ) ); WALBERLA_CHECK_IDENTICAL( refAABB.minCorner()[1], std::min( y0, y1 ) ); WALBERLA_CHECK_IDENTICAL( refAABB.minCorner()[2], std::min( z0, z1 ) ); -- GitLab