X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FvtkELNOMeshFilter.cxx;h=62aa3e6e4ebd3058c1ecf34b1392359fa6c65a84;hb=f671e69102c5ae8e2194509a6b719fae0b06d26c;hp=ec4107105ffde4005ff95bbfcdb796c039410d78;hpb=31c4fb7eb65d19f8b21266c38a0460e37fc9d39a;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx index ec410710..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(); @@ -108,7 +108,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, for(int index = 0; index < fielddata->GetNumberOfArrays(); index++) { vtkDataArray *data(fielddata->GetArray(index)); - vtkQuadratureSchemeDefinition **dict(0); + vtkQuadratureSchemeDefinition **dict = 0; vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY()); if(key->Has(data->GetInformation())) { @@ -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; }