Fixing some compile errors with clang
This commit is contained in:
parent
e0ab2445bb
commit
46903e4494
12
IO/Mesh.cpp
12
IO/Mesh.cpp
@ -300,11 +300,11 @@ shared_ptr<PointList> getPointList( shared_ptr<Mesh> mesh )
|
||||
shared_ptr<TriMesh> getTriMesh( shared_ptr<Mesh> mesh )
|
||||
{
|
||||
shared_ptr<TriMesh> mesh2;
|
||||
if ( dynamic_pointer_cast<TriMesh>(mesh) != NULL ) {
|
||||
if ( dynamic_pointer_cast<TriMesh>(mesh).get() != NULL ) {
|
||||
mesh2 = dynamic_pointer_cast<TriMesh>(mesh);
|
||||
} else if ( dynamic_pointer_cast<TriList>(mesh) != NULL ) {
|
||||
} else if ( dynamic_pointer_cast<TriList>(mesh).get() != NULL ) {
|
||||
shared_ptr<TriList> trilist = dynamic_pointer_cast<TriList>(mesh);
|
||||
ASSERT(trilist!=NULL);
|
||||
ASSERT(trilist.get()!=NULL);
|
||||
mesh2.reset( new TriMesh(*trilist) );
|
||||
}
|
||||
return mesh2;
|
||||
@ -312,11 +312,11 @@ shared_ptr<TriMesh> getTriMesh( shared_ptr<Mesh> mesh )
|
||||
shared_ptr<TriList> getTriList( shared_ptr<Mesh> mesh )
|
||||
{
|
||||
shared_ptr<TriList> mesh2;
|
||||
if ( dynamic_pointer_cast<TriList>(mesh) != NULL ) {
|
||||
if ( dynamic_pointer_cast<TriList>(mesh).get() != NULL ) {
|
||||
mesh2 = dynamic_pointer_cast<TriList>(mesh);
|
||||
} else if ( dynamic_pointer_cast<TriMesh>(mesh) != NULL ) {
|
||||
} else if ( dynamic_pointer_cast<TriMesh>(mesh).get() != NULL ) {
|
||||
shared_ptr<TriMesh> trimesh = dynamic_pointer_cast<TriMesh>(mesh);
|
||||
ASSERT(trimesh!=NULL);
|
||||
ASSERT(trimesh.get()!=NULL);
|
||||
mesh2.reset( new TriList(*trimesh) );
|
||||
}
|
||||
return mesh2;
|
||||
|
@ -402,9 +402,9 @@ std::vector<MeshDatabase> read( const std::string& filename )
|
||||
IO::MeshType meshType( shared_ptr<IO::Mesh> mesh )
|
||||
{
|
||||
IO::MeshType type = IO::Unknown;
|
||||
if ( dynamic_pointer_cast<IO::PointList>(mesh)!=NULL ) {
|
||||
if ( dynamic_pointer_cast<IO::PointList>(mesh).get()!=NULL ) {
|
||||
type = IO::PointMesh;
|
||||
} else if ( dynamic_pointer_cast<IO::TriList>(mesh)!=NULL || dynamic_pointer_cast<IO::TriMesh>(mesh)!=NULL ) {
|
||||
} else if ( dynamic_pointer_cast<IO::TriList>(mesh).get()!=NULL || dynamic_pointer_cast<IO::TriMesh>(mesh).get()!=NULL ) {
|
||||
type = IO::SurfaceMesh;
|
||||
} else {
|
||||
ERROR("Unknown mesh");
|
||||
|
@ -42,7 +42,7 @@ static std::vector<IO::MeshDatabase> writeMeshesOrigFormat( const std::vector<IO
|
||||
//for (size_t j=0; j<meshData[i].vars.size(); j++)
|
||||
// mesh_entry.variables.push_back( meshData[i].vars[j]->name );
|
||||
}
|
||||
if ( dynamic_pointer_cast<IO::PointList>(mesh)!=NULL ) {
|
||||
if ( dynamic_pointer_cast<IO::PointList>(mesh).get()!=NULL ) {
|
||||
// List of points
|
||||
shared_ptr<IO::PointList> pointlist = dynamic_pointer_cast<IO::PointList>(mesh);
|
||||
const std::vector<Point>& P = pointlist->points;
|
||||
@ -51,7 +51,7 @@ static std::vector<IO::MeshDatabase> writeMeshesOrigFormat( const std::vector<IO
|
||||
x[0] = P[i].x; x[1] = P[i].y; x[2] = P[i].z;
|
||||
fwrite(x,sizeof(double),3,fid);
|
||||
}
|
||||
} else if ( dynamic_pointer_cast<IO::TriList>(mesh)!=NULL || dynamic_pointer_cast<IO::TriMesh>(mesh)!=NULL ) {
|
||||
} else if ( dynamic_pointer_cast<IO::TriList>(mesh).get()!=NULL || dynamic_pointer_cast<IO::TriMesh>(mesh).get()!=NULL ) {
|
||||
// Triangle mesh
|
||||
shared_ptr<IO::TriList> trilist = IO::getTriList(mesh);
|
||||
const std::vector<Point>& A = trilist->A;
|
||||
|
Loading…
Reference in New Issue
Block a user