PVS: fixes several issues

This commit is contained in:
wmayer
2019-03-13 01:19:00 +01:00
parent 8f6bf8eafc
commit 51aeb5867a
4 changed files with 18 additions and 8 deletions

View File

@@ -821,8 +821,8 @@ inline MeshFacet::MeshFacet (void)
: _ucFlag(0),
_ulProp(0)
{
memset(_aulNeighbours, 0xff, sizeof(ULONG_MAX) * 3);
memset(_aulPoints, 0xff, sizeof(ULONG_MAX) * 3);
memset(_aulNeighbours, 0xff, sizeof(unsigned long) * 3);
memset(_aulPoints, 0xff, sizeof(unsigned long) * 3);
}
inline MeshFacet::MeshFacet(const MeshFacet &rclF)

View File

@@ -1380,12 +1380,11 @@ bool MeshInput::LoadInventor (std::istream &rstrIn)
std::streambuf* buf = rstrIn.rdbuf();
if (!buf)
return false;
if (buf) {
std::streamoff ulCurr;
ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in);
ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in);
buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in);
}
std::streamoff ulCurr;
ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in);
ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in);
buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in);
std::string line;
MeshGeomFacet clFacet;

View File

@@ -81,6 +81,16 @@ const std::vector<unsigned long>& Segment::getIndices() const
return _indices;
}
Segment::Segment(const Segment& s)
: _mesh(s._mesh)
, _indices(s._indices)
, _name(s._name)
, _save(s._save)
, _modifykernel(s._modifykernel)
{
}
const Segment& Segment::operator = (const Segment& s)
{
// Do not copy the MeshObject pointer

View File

@@ -44,6 +44,7 @@ public:
const std::vector<unsigned long>& getIndices() const;
bool isEmpty() const { return _indices.empty(); }
Segment(const Segment&);
const Segment& operator = (const Segment&);
bool operator == (const Segment&) const;