Skip to content
Snippets Groups Projects
Commit 6c10be5b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix build+warnings

parent 710cf434
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1) GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1)
: GEntity(model, tag), _length(0.), _tooSmall(false), _cp(0), : GEntity(model, tag), _length(0.), _tooSmall(false), _cp(0),
v0(_v0), v1(_v1), compound(0) v0(_v0), v1(_v1), compound(0), masterOrientation(0)
{ {
if(v0) v0->addEdge(this); if(v0) v0->addEdge(this);
if(v1 && v1 != v0) v1->addEdge(this); if(v1 && v1 != v0) v1->addEdge(this);
...@@ -45,10 +45,11 @@ void GEdge::deleteMesh() ...@@ -45,10 +45,11 @@ void GEdge::deleteMesh()
model()->destroyMeshCaches(); model()->destroyMeshCaches();
} }
void GEdge::setMeshMaster(GEdge* ge,int ori) { void GEdge::setMeshMaster(GEdge* ge,int ori)
{
#if !defined(_MSC_VER)
#warning missing:computation of affine transformation during setMeshMaster #warning missing:computation of affine transformation during setMeshMaster
#endif
GEntity::setMeshMaster(ge); GEntity::setMeshMaster(ge);
masterOrientation = ori > 0 ? 1 : -1; masterOrientation = ori > 0 ? 1 : -1;
...@@ -572,7 +573,6 @@ SPoint3 GEdge :: closestPoint (SPoint3 &p, double tolerance) ...@@ -572,7 +573,6 @@ SPoint3 GEdge :: closestPoint (SPoint3 &p, double tolerance)
return (*_cp)(p); return (*_cp)(p);
} }
typedef struct { typedef struct {
SPoint3 p; SPoint3 p;
double t; double t;
......
...@@ -26,8 +26,6 @@ class closestPointFinder; ...@@ -26,8 +26,6 @@ class closestPointFinder;
// A model edge. // A model edge.
class GEdge : public GEntity{ class GEdge : public GEntity{
private: private:
double _length; double _length;
bool _tooSmall; bool _tooSmall;
...@@ -42,7 +40,6 @@ class GEdge : public GEntity { ...@@ -42,7 +40,6 @@ class GEdge : public GEntity {
// for specific solid modelers that need to re-do the internal curve // for specific solid modelers that need to re-do the internal curve
// if a topological change ending points is done (glueing) // if a topological change ending points is done (glueing)
virtual void replaceEndingPointsInternals(GVertex *, GVertex *) {} virtual void replaceEndingPointsInternals(GVertex *, GVertex *) {}
public: public:
GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1); GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1);
virtual ~GEdge(); virtual ~GEdge();
......
...@@ -34,8 +34,7 @@ struct surface_params ...@@ -34,8 +34,7 @@ struct surface_params
class GRegion; class GRegion;
// A model face. // A model face.
class GFace : public GEntity class GFace : public GEntity{
{
protected: protected:
// edge loops might replace what follows (list of all the edges of // edge loops might replace what follows (list of all the edges of
// the face + directions) // the face + directions)
......
...@@ -63,21 +63,21 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm) ...@@ -63,21 +63,21 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm)
case 2 : s = gm->getFaceByTag(slave); m = gm->getFaceByTag(master); break; case 2 : s = gm->getFaceByTag(slave); m = gm->getFaceByTag(master); break;
} }
if (s && m){ if (s && m){
char token[6]; char token[6];
fpos_t pos; fpos_t pos;
fgetpos(fp, &pos); fgetpos(fp, &pos);
fscanf(fp,"%s",token); if(fscanf(fp, "%s", token) != 1) return;
if(strcmp(token, "Affine") == 0) { if(strcmp(token, "Affine") == 0) {
std::vector<double> tfo; std::vector<double> tfo;
for (int i=0;i<16;i++) fscanf(fp,"%lf",&tfo[i]); for(int i = 0; i < 16; i++){
if(fscanf(fp, "%lf", &tfo[i]) != 1) return;
}
s->setMeshMaster(m, tfo); s->setMeshMaster(m, tfo);
} }
else { else {
fsetpos(fp, &pos); fsetpos(fp, &pos);
s->setMeshMaster(m); s->setMeshMaster(m);
} }
int numv; int numv;
if(fscanf(fp, "%d", &numv) != 1) numv = 0; if(fscanf(fp, "%d", &numv) != 1) numv = 0;
for(int j = 0; j < numv; j++){ for(int j = 0; j < numv; j++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment