diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-02-16 02:26:43 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-02-27 22:29:55 +0400 |
commit | 3f3fd880f07feae9f2d177654d97e455741ed61a (patch) | |
tree | abd2f59cf6f0e84a1297c743f8b603c854c9686c /src/SubPic/CoordGeom.cpp | |
parent | 9f554c9251829bcfe4693bab140b48179b263b67 (diff) |
Disable a few cppcheck warnings that are intentional.
Diffstat (limited to 'src/SubPic/CoordGeom.cpp')
-rw-r--r-- | src/SubPic/CoordGeom.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/SubPic/CoordGeom.cpp b/src/SubPic/CoordGeom.cpp index 85c81126f..6b755a2ed 100644 --- a/src/SubPic/CoordGeom.cpp +++ b/src/SubPic/CoordGeom.cpp @@ -155,6 +155,7 @@ Vector Vector::Refract(Vector& N, float nFront, float nBack, float* nOut) Vector cos_D = N * N_dot_D;
Vector sin_T = (cos_D - D) * n;
+ // cppcheck-suppress duplicateExpression
float len_sin_T = sin_T | sin_T;
if (len_sin_T > 1) {
@@ -186,6 +187,7 @@ Vector Vector::Refract2(Vector& N, float nFrom, float nTo, float* nOut) Vector cos_D = N * N_dot_D;
Vector sin_T = (cos_D - D) * n;
+ // cppcheck-suppress duplicateExpression
float len_sin_T = sin_T | sin_T;
if (len_sin_T > 1) {
@@ -371,6 +373,7 @@ float Ray::GetDistanceFrom(Ray& r) float Ray::GetDistanceFrom(Vector& v)
{
+ // cppcheck-suppress duplicateExpression
float t = ((v - p) | d) / (d | d);
return ((p + d * t) - v).Length();
}
|