fix scan coverity issues
This commit is contained in:
@@ -676,8 +676,8 @@ void cLineSegment::SetPoints(Point3D & p1, Point3D & p2)
|
||||
void cLineSegment::PointAt(float dist, Point3D & retp)
|
||||
{
|
||||
retp.x = pStart.x + pDir.x * dist;
|
||||
retp.x = pStart.y + pDir.y * dist;
|
||||
retp.x = pStart.z + pDir.z * dist;
|
||||
retp.y = pStart.y + pDir.y * dist;
|
||||
retp.z = pStart.z + pDir.z * dist;
|
||||
}
|
||||
|
||||
//************************************************************************************************************
|
||||
@@ -746,7 +746,7 @@ void cSimTool::InitTool() // pos is 0..1 location along the radius of the tool
|
||||
}
|
||||
}
|
||||
|
||||
cVolSim::cVolSim()
|
||||
cVolSim::cVolSim() : stock(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
#define SIM_WALK_RES 0.6 // step size in pixel units (to make sure all pixels in the path are visited)
|
||||
struct Point3D
|
||||
{
|
||||
Point3D() {}
|
||||
Point3D(float x, float y, float z) : x(x), y(y), z(z) {}
|
||||
Point3D(Base::Vector3d & vec) : x(vec[0]), y(vec[1]), z(vec[2]) {}
|
||||
Point3D(Base::Placement & pl) : x(pl.getPosition()[0]), y(pl.getPosition()[1]), z(pl.getPosition()[2]) {}
|
||||
Point3D() : x(0), y(0), z(0), sina(0), cosa(0) {}
|
||||
Point3D(float x, float y, float z) : x(x), y(y), z(z), sina(0), cosa(0) {}
|
||||
Point3D(Base::Vector3d & vec) : x(vec[0]), y(vec[1]), z(vec[2]), sina(0), cosa(0) {}
|
||||
Point3D(Base::Placement & pl) : x(pl.getPosition()[0]), y(pl.getPosition()[1]), z(pl.getPosition()[2]), sina(0), cosa(0) {}
|
||||
inline void set(float px, float py, float pz) { x = px; y = py; z = pz; }
|
||||
inline void Add(Point3D & p) { x += p.x; y += p.y; z += p.z; }
|
||||
inline void Rotate() { float tx = x; x = x * cosa - y * sina; y = tx * sina + y * cosa; }
|
||||
@@ -110,7 +110,7 @@ template <class T>
|
||||
class Array2D
|
||||
{
|
||||
public:
|
||||
Array2D() : data(nullptr) {}
|
||||
Array2D() : data(nullptr), height(0) {}
|
||||
|
||||
~Array2D()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user