summaryrefslogtreecommitdiff
path: root/test/test-maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-01-08 16:34:43 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-01-08 16:34:43 +0000
commit8cd0977a3688fa705c83867c57505a47b9269369 (patch)
treeb7b48711051299607077ed31fdf3b3f6dd6cc41f /test/test-maths.cpp
parentTidy shadow map creation (diff)
downloadilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.bz2
ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.xz
ilt-8cd0977a3688fa705c83867c57505a47b9269369.zip
Fix up all the static analyzer warnings
Diffstat (limited to 'test/test-maths.cpp')
-rw-r--r--test/test-maths.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/test-maths.cpp b/test/test-maths.cpp
index d6c0fc1..6ee2113 100644
--- a/test/test-maths.cpp
+++ b/test/test-maths.cpp
@@ -1,6 +1,6 @@
#define BOOST_TEST_MODULE test_maths
-#include "test-helpers.hpp"
+#include "testHelpers.h"
#include <boost/test/data/test_case.hpp>
#include <boost/test/unit_test.hpp>
#include <glm/gtx/transform.hpp>
@@ -187,7 +187,7 @@ BOOST_DATA_TEST_CASE(straight1,
}),
v, angFor, angBack)
{
- TestLinkStraight l(v);
+ const TestLinkStraight l(v);
{
const auto p = l.positionAt(0, 0);
BOOST_CHECK_EQUAL(p.pos, origin);
@@ -220,7 +220,7 @@ BOOST_DATA_TEST_CASE(curve1,
e1, ctr, angFor, angBack)
{
{ // One-way...
- TestLinkCurve l(origin, e1, ctr);
+ const TestLinkCurve l(origin, e1, ctr);
BOOST_CHECK_EQUAL(l.radius, 1.F);
{
const auto p = l.positionAt(0, 0);
@@ -235,7 +235,7 @@ BOOST_DATA_TEST_CASE(curve1,
}
{ // The other way...
- TestLinkCurve l(e1, origin, ctr);
+ const TestLinkCurve l(e1, origin, ctr);
BOOST_CHECK_EQUAL(l.radius, 1.F);
{
const auto p = l.positionAt(0, 0);
@@ -307,6 +307,15 @@ BOOST_DATA_TEST_CASE(rayLineDistance,
n_test_points_between(), // cz
i1, n1x, i2, n1y, i3, n1z, i4, n2x, i5, n2y, i6, n2z, i7, cx, i8, cy, i9, cz)
{
+ (void)i1;
+ (void)i2;
+ (void)i3;
+ (void)i4;
+ (void)i5;
+ (void)i6;
+ (void)i7;
+ (void)i8;
+ (void)i9;
const glm::vec3 n1 {n1x, n1y, n1z}, n2 {n2x, n2y, n2z}, c {cx, cy, cz};
const auto nstep = n2 - n1;