From d20a303a53779bc7aba0eeb2cb84e3dbc16ca781 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Tue, 13 Dec 2016 14:57:58 +0100 Subject: [PATCH] [MeL] Fix Vtk version tests. --- MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h | 2 +- MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h | 8 ++++---- MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h | 2 +- MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h index 201e898a8f5..39a56743810 100644 --- a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h +++ b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate-impl.h @@ -436,7 +436,7 @@ template <class Scalar> vtkIdType VtkMappedPropertyVectorTemplate<Scalar> return -1; } -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) //------------------------------------------------------------------------------ template <class Scalar> Scalar VtkMappedPropertyVectorTemplate<Scalar>::GetValue(vtkIdType idx) const diff --git a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h index 642b1ee8b1d..5358222a9a4 100644 --- a/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h +++ b/MeshLib/Vtk/VtkMappedPropertyVectorTemplate.h @@ -20,7 +20,7 @@ #include <vtkObjectFactory.h> // for vtkStandardNewMacro #include <vtkVersion.h> -#if VTK_MAJOR_VERSION < 7 || VTK_MINOR_VERSION < 1 +#if VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1 #include <vtkTypeTemplate.h> // For templated vtkObject API #endif @@ -29,7 +29,7 @@ namespace MeshLib { template <class Scalar> class VtkMappedPropertyVectorTemplate : -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) public vtkMappedDataArray<Scalar> #else public vtkTypeTemplate<VtkMappedPropertyVectorTemplate<Scalar>, @@ -37,7 +37,7 @@ class VtkMappedPropertyVectorTemplate : #endif // vtk version { public: -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) vtkTemplateTypeMacro(VtkMappedPropertyVectorTemplate<Scalar>, vtkMappedDataArray<Scalar>); #else @@ -100,7 +100,7 @@ public: vtkIdType InsertNextValue(Scalar v) override; void InsertValue(vtkIdType idx, Scalar v) override; -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) Scalar GetValue(vtkIdType idx) const override; void GetTypedTuple(vtkIdType idx, Scalar* t) const override; void SetTypedTuple(vtkIdType i, const Scalar* t) override; diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h index e51182f92fa..b95c8fb201c 100644 --- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h +++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate-impl.h @@ -398,7 +398,7 @@ template <class Scalar> vtkIdType VtkMeshNodalCoordinatesTemplate<Scalar> } -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) template <class Scalar> Scalar& VtkMeshNodalCoordinatesTemplate<Scalar> ::GetValueReference(vtkIdType idx) const { diff --git a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h index 87333375af2..a6731143016 100644 --- a/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h +++ b/MeshLib/Vtk/VtkMeshNodalCoordinatesTemplate.h @@ -20,7 +20,7 @@ #include <vtkObjectFactory.h> // for vtkStandardNewMacro #include <vtkVersion.h> -#if VTK_MAJOR_VERSION < 7 || VTK_MINOR_VERSION < 1 +#if VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1 #include <vtkTypeTemplate.h> // For templated vtkObject API #endif @@ -33,7 +33,7 @@ namespace MeshLib { template <class Scalar> class VtkMeshNodalCoordinatesTemplate : -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) public vtkMappedDataArray<Scalar> #else public vtkTypeTemplate<VtkMeshNodalCoordinatesTemplate<Scalar>, @@ -41,7 +41,7 @@ class VtkMeshNodalCoordinatesTemplate : #endif // vtk version { public: -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) vtkTemplateTypeMacro(VtkMeshNodalCoordinatesTemplate<Scalar>, vtkMappedDataArray<Scalar>); #else @@ -101,7 +101,7 @@ public: vtkIdType InsertNextValue(Scalar v) override; void InsertValue(vtkIdType idx, Scalar v) override; -#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1 +#if !(VTK_MAJOR_VERSION < 7 || VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION < 1) Scalar& GetValueReference(vtkIdType idx) const; Scalar GetValue(vtkIdType idx) const override; void GetTypedTuple(vtkIdType idx, Scalar* t) const override; -- GitLab