diff --git a/src/Mod/Mesh/App/Core/Elements.h b/src/Mod/Mesh/App/Core/Elements.h index 6b2ce74f61..7d289dca40 100644 --- a/src/Mod/Mesh/App/Core/Elements.h +++ b/src/Mod/Mesh/App/Core/Elements.h @@ -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) diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index 30b25f3d72..96c7d15db1 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -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; diff --git a/src/Mod/Mesh/App/Segment.cpp b/src/Mod/Mesh/App/Segment.cpp index 18ffc6fc73..ccc2f2d31b 100644 --- a/src/Mod/Mesh/App/Segment.cpp +++ b/src/Mod/Mesh/App/Segment.cpp @@ -81,6 +81,16 @@ const std::vector& 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 diff --git a/src/Mod/Mesh/App/Segment.h b/src/Mod/Mesh/App/Segment.h index 26f8876e91..459ef93ee2 100644 --- a/src/Mod/Mesh/App/Segment.h +++ b/src/Mod/Mesh/App/Segment.h @@ -44,6 +44,7 @@ public: const std::vector& getIndices() const; bool isEmpty() const { return _indices.empty(); } + Segment(const Segment&); const Segment& operator = (const Segment&); bool operator == (const Segment&) const;