Skip to content

Commit

Permalink
Suppress cpp-check warnings in AABB.h
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Sep 3, 2024
1 parent 85e3431 commit 289f2f7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions freud/locality/AABB.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,16 @@ struct CACHE_ALIGN AABB
*/
AABB(const vec3<float>& _lower, const vec3<float>& _upper) : tag(0)
{
// cppcheck-suppress-begin useInitializationList
#if defined(__SSE__)
lower_v = sse_load_vec3_float(_lower);
upper_v = sse_load_vec3_float(_upper);

#else
lower = _lower;
upper = _upper;

#endif
// cppcheck-suppress-end useInitializationList
}

//! Construct an AABB from a sphere
Expand All @@ -114,15 +115,16 @@ 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);

#else
lower = new_lower;
upper = new_upper;

#endif
// cppcheck-suppress-end useInitializationList
}

//! Construct an AABB from a point with a particle tag
Expand All @@ -131,15 +133,16 @@ struct CACHE_ALIGN AABB
*/
AABB(const vec3<float>& _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);

#else
lower = _position;
upper = _position;

#endif
// cppcheck-suppress-end useInitializationList
}

//! Get the AABB's position
Expand Down Expand Up @@ -227,13 +230,14 @@ struct CACHE_ALIGN AABBSphere
*/
AABBSphere(const vec3<float>& _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
Expand All @@ -243,13 +247,14 @@ struct CACHE_ALIGN AABBSphere
*/
AABBSphere(const vec3<float>& _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
Expand Down

0 comments on commit 289f2f7

Please sign in to comment.