X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FvtkELNOMeshFilter.cxx;h=62aa3e6e4ebd3058c1ecf34b1392359fa6c65a84;hb=0aca9e62c928f151af43789b5fd908a774758922;hp=513b063705f4f7ae412829a7811e116d77a83e2d;hpb=e5ccb9a0a1b60b0f357fe7972ba4221a0b36d51e;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx index 513b0637..62aa3e6e 100644 --- a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx +++ b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// Copyright (C) 2010-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -41,7 +41,7 @@ vtkStandardNewMacro(vtkELNOMeshFilter); -vtkELNOMeshFilter::vtkELNOMeshFilter() +vtkELNOMeshFilter::vtkELNOMeshFilter():ShrinkFactor(0.9999) { } @@ -71,7 +71,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, usgInClone->ShallowCopy(usgIn); vtkSmartPointer shrink(vtkSmartPointer::New()); shrink->SetInputData(usgInClone); - shrink->SetShrinkFactor(0.9999); + shrink->SetShrinkFactor(this->ShrinkFactor); shrink->Update(); vtkUnstructuredGrid *shrinked(shrink->GetOutput()); usgInClone->Delete(); @@ -117,7 +117,10 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, key->GetRange(data->GetInformation(),dict,0,0,dictSize); } if(data == NULL) - continue; + { + delete [] dict; + continue; + } vtkInformation *info(data->GetInformation()); const char *arrayOffsetName(info->Get(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME())); @@ -139,6 +142,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, usgOut->GetPointData()->AddArray(data); else shrinked->GetFieldData()->AddArray(data); + delete [] dict; continue; } else @@ -192,7 +196,10 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, } } else - continue ; + { + delete [] dict; + continue ; + } } delete [] dict; }