From b11c4c142c86ce34c0f29ef46d391555b459e04e Mon Sep 17 00:00:00 2001 From: cutealien Date: Thu, 6 Jan 2022 14:02:12 +0000 Subject: [PATCH] Remove several copy-constructors and assignment operators which did nothing special. They all just implemented the same the default functions do. This causes now warnings with newer gcc -Wdeprecated settings (otherwise they would have had to implement always both, but makes no sense as they did nothing special). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6280 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/IQ3Shader.h | 6 ------ include/SViewFrustum.h | 24 ------------------------ include/irrMap.h | 14 -------------- include/line2d.h | 14 ++++++-------- tests/tests-last-passed-at.txt | 8 ++++---- 5 files changed, 10 insertions(+), 56 deletions(-) diff --git a/include/IQ3Shader.h b/include/IQ3Shader.h index 31b3c2d..8541a7f 100644 --- a/include/IQ3Shader.h +++ b/include/IQ3Shader.h @@ -639,12 +639,6 @@ namespace quake3 : ID ( 0 ), VarGroup ( 0 ) {} virtual ~IShader () {} - void operator = (const IShader &other ) - { - ID = other.ID; - VarGroup = other.VarGroup; - name = other.name; - } bool operator == (const IShader &other ) const { diff --git a/include/SViewFrustum.h b/include/SViewFrustum.h index 0a97349..3c0be0e 100644 --- a/include/SViewFrustum.h +++ b/include/SViewFrustum.h @@ -47,9 +47,6 @@ namespace scene //! Default Constructor SViewFrustum() : BoundingRadius(0.f), FarNearDistance(0.f) {} - //! Copy Constructor - SViewFrustum(const SViewFrustum& other); - //! This constructor creates a view frustum based on a projection and/or view matrix. //\param zClipFromZero: Clipping of z can be projected from 0 to w when true (D3D style) and from -w to w when false (OGL style). SViewFrustum(const core::matrix4& mat, bool zClipFromZero); @@ -140,27 +137,6 @@ namespace scene core::vector3df BoundingCenter; }; - - /*! - Copy constructor ViewFrustum - */ - inline SViewFrustum::SViewFrustum(const SViewFrustum& other) - { - cameraPosition=other.cameraPosition; - boundingBox=other.boundingBox; - - u32 i; - for (i=0; i& start, const vector2d& end) : start(start), end(end) {} - //! Copy constructor. - line2d(const line2d& other) : start(other.start), end(other.end) {} // operators @@ -97,12 +95,12 @@ class line2d /*! Check if 2 segments are incident (intersects in exactly 1 point).*/ bool incidentSegments( const line2d& other) const { - return + return start.checkOrientation( end, other.start) != start.checkOrientation( end, other.end) && other.start.checkOrientation( other.end, start) != other.start.checkOrientation( other.end, end); } - /*! Check if 2 lines/segments are parallel or nearly parallel.*/ + /*! Check if 2 lines/segments are parallel or nearly parallel.*/ bool nearlyParallel( const line2d& line, const T factor = relativeErrorFactor()) const { const vector2d a = getVector(); @@ -112,14 +110,14 @@ class line2d } /*! returns a intersection point of 2 lines (if lines are not parallel). Behaviour - undefined if lines are parallel or coincident. + undefined if lines are parallel or coincident. It's on optimized intersectWith with checkOnlySegments=false and ignoreCoincidentLines=true */ vector2d fastLinesIntersection( const line2d& l) const { const f32 commonDenominator = (f32)((l.end.Y - l.start.Y)*(end.X - start.X) - (l.end.X - l.start.X)*(end.Y - start.Y)); - + if ( commonDenominator != 0.f ) { const f32 numeratorA = (f32)((l.end.X - l.start.X)*(start.Y - l.start.Y) - @@ -129,7 +127,7 @@ class line2d // Calculate the intersection point. return vector2d ( - (T)(start.X + uA * (end.X - start.X)), + (T)(start.X + uA * (end.X - start.X)), (T)(start.Y + uA * (end.Y - start.Y)) ); } @@ -293,7 +291,7 @@ class line2d /** Assumes that the point is already somewhere on the line. */ bool isPointBetweenStartAndEnd(const vector2d& point) const { - return point.isBetweenPoints(start, end); + return point.isBetweenPoints(start, end); } //! Get the closest point on this line to a point diff --git a/tests/tests-last-passed-at.txt b/tests/tests-last-passed-at.txt index ce36a6b..97e8e82 100644 --- a/tests/tests-last-passed-at.txt +++ b/tests/tests-last-passed-at.txt @@ -1,4 +1,4 @@ -Tests finished. 72 tests of 72 passed. -Compiled as DEBUG -Test suite pass at GMT Sat Feb 13 16:24:31 2021 - +Tests finished. 72 tests of 72 passed. +Compiled as DEBUG +Test suite pass at GMT Thu Jan 6 13:59:44 2022 +