From 289f2f748478d8aa0b98ed68de96d5f5ec509c4d Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 3 Sep 2024 11:42:58 -0400 Subject: [PATCH] Suppress cpp-check warnings in AABB.h --- freud/locality/AABB.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/freud/locality/AABB.h b/freud/locality/AABB.h index 1e045c4f0..efbd75f8b 100644 --- a/freud/locality/AABB.h +++ b/freud/locality/AABB.h @@ -89,6 +89,7 @@ struct CACHE_ALIGN AABB */ AABB(const vec3& _lower, const vec3& _upper) : tag(0) { + // cppcheck-suppress-begin useInitializationList #if defined(__SSE__) lower_v = sse_load_vec3_float(_lower); upper_v = sse_load_vec3_float(_upper); @@ -96,8 +97,8 @@ struct CACHE_ALIGN AABB #else lower = _lower; upper = _upper; - #endif + // cppcheck-suppress-end useInitializationList } //! Construct an AABB from a sphere @@ -114,6 +115,7 @@ struct CACHE_ALIGN AABB new_upper.y = _position.y + radius; new_upper.z = _position.z + radius; + // cppcheck-suppress-begin useInitializationList #if defined(__SSE__) lower_v = sse_load_vec3_float(new_lower); upper_v = sse_load_vec3_float(new_upper); @@ -121,8 +123,8 @@ struct CACHE_ALIGN AABB #else lower = new_lower; upper = new_upper; - #endif + // cppcheck-suppress-end useInitializationList } //! Construct an AABB from a point with a particle tag @@ -131,6 +133,7 @@ struct CACHE_ALIGN AABB */ AABB(const vec3& _position, unsigned int _tag) : tag(_tag) { + // cppcheck-suppress-begin useInitializationList #if defined(__SSE__) lower_v = sse_load_vec3_float(_position); upper_v = sse_load_vec3_float(_position); @@ -138,8 +141,8 @@ struct CACHE_ALIGN AABB #else lower = _position; upper = _position; - #endif + // cppcheck-suppress-end useInitializationList } //! Get the AABB's position @@ -227,13 +230,14 @@ struct CACHE_ALIGN AABBSphere */ AABBSphere(const vec3& _position, float _radius) : radius(_radius), tag(0) { + // cppcheck-suppress-begin useInitializationList #if defined(__SSE__) position_v = sse_load_vec3_float(_position); #else position = _position; - #endif + // cppcheck-suppress-end useInitializationList } //! Construct an AABBSphere from the given position and radius with a tag @@ -243,13 +247,14 @@ struct CACHE_ALIGN AABBSphere */ AABBSphere(const vec3& _position, float _radius, unsigned int _tag) : radius(_radius), tag(_tag) { + // cppcheck-suppress-begin useInitializationList #if defined(__SSE__) position_v = sse_load_vec3_float(_position); #else position = _position; - #endif + // cppcheck-suppress-end useInitializationList } //! Get the AABBSphere's position