From bd248fc052f812ba27e556a858aceaccb51c681e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 23 Jan 2019 09:03:06 +0100 Subject: [PATCH] STYLE: use const reference for caught exceptions --- .../vtkPVFoam/vtkPVFoamFieldTemplates.C | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/paraview-plugins/vtkPVFoam/vtkPVFoamFieldTemplates.C b/src/paraview-plugins/vtkPVFoam/vtkPVFoamFieldTemplates.C index 1790c2d..71f245e 100644 --- a/src/paraview-plugins/vtkPVFoam/vtkPVFoamFieldTemplates.C +++ b/src/paraview-plugins/vtkPVFoam/vtkPVFoamFieldTemplates.C @@ -286,12 +286,12 @@ void Foam::vtkPVFoam::convertVolFields // Convert convertVolField(patchInterpList, fld); } - catch (Foam::IOerror& ioErr) + catch (const Foam::IOerror& ioErr) { ioErr.write(Warning, false); Info<< nl << endl; } - catch (Foam::error& err) + catch (const Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); @@ -368,12 +368,12 @@ void Foam::vtkPVFoam::convertDimFields convertVolField(patchInterpList, volFld); } - catch (Foam::IOerror& ioErr) + catch (const Foam::IOerror& ioErr) { ioErr.write(Warning, false); Info<< nl << endl; } - catch (Foam::error& err) + catch (const Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); @@ -496,12 +496,12 @@ void Foam::vtkPVFoam::convertAreaFields dataset->GetCellData()->AddArray(cdata); } } - catch (Foam::IOerror& ioErr) + catch (const Foam::IOerror& ioErr) { ioErr.write(Warning, false); Info<< nl << endl; } - catch (Foam::error& err) + catch (const Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); @@ -638,12 +638,12 @@ void Foam::vtkPVFoam::convertPointFields dataset->GetPointData()->AddArray(pdata); } } - catch (Foam::IOerror& ioErr) + catch (const Foam::IOerror& ioErr) { ioErr.write(Warning, false); Info<< nl << endl; } - catch (Foam::error& err) + catch (const Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); @@ -817,12 +817,12 @@ void Foam::vtkPVFoam::convertLagrangianFields vtkmesh->GetCellData()->AddArray(data); vtkmesh->GetPointData()->AddArray(data); } - catch (Foam::IOerror& ioErr) + catch (const Foam::IOerror& ioErr) { ioErr.write(Warning, false); Info<< nl << endl; } - catch (Foam::error& err) + catch (const Foam::error& err) { // Bit of trickery to get the original message err.write(Warning, false); -- GitLab