From 661683b9cfac23458236697d1153bb77f2edc3e7 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 20 Jun 2018 09:27:51 +0000 Subject: Fix build of math/vtk6 with Clang6 on -CURRENT. The definition of NULL has changed in C++, and conversions have gotten stricter, so using NULL where you mean 0 (or false) is no longer an option. Detected by fallout from updating CMake 3.12. No PORTREVISION bump because everywhere where it compiled previously sees no change, and where it didn't compile before it does now with the same result. Reported by: tcberner --- ...tch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 math/vtk6/files/patch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx (limited to 'math/vtk6/files/patch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx') diff --git a/math/vtk6/files/patch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx b/math/vtk6/files/patch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx new file mode 100644 index 000000000000..e1a4bf0eaaef --- /dev/null +++ b/math/vtk6/files/patch-Rendering_OpenGL_vtkXOpenGLRenderWindow.cxx @@ -0,0 +1,40 @@ +--- Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx.orig 2015-03-03 20:37:14 UTC ++++ Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx +@@ -386,7 +386,7 @@ XVisualInfo *vtkXOpenGLRenderWindow::Get + + vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow() + { +- this->ParentId = static_cast(NULL); ++ this->ParentId = static_cast(0); + this->ScreenSize[0] = 0; + this->ScreenSize[1] = 0; + this->OwnDisplay = 0; +@@ -394,8 +394,8 @@ vtkXOpenGLRenderWindow::vtkXOpenGLRender + this->ForceMakeCurrent = 0; + this->UsingHardware = 0; + this->DisplayId = static_cast(NULL); +- this->WindowId = static_cast(NULL); +- this->NextWindowId = static_cast(NULL); ++ this->WindowId = static_cast(0); ++ this->NextWindowId = static_cast(0); + this->ColorMap = static_cast(0); + this->OwnWindow = 0; + +@@ -776,7 +776,7 @@ void vtkXOpenGLRenderWindow::DestroyWind + if (this->OwnWindow && this->DisplayId && this->WindowId) + { + XDestroyWindow(this->DisplayId,this->WindowId); +- this->WindowId = static_cast(NULL); ++ this->WindowId = static_cast(0); + } + + // if we create the display, we'll delete it +@@ -1168,7 +1168,7 @@ void vtkXOpenGLRenderWindow::WindowRemap + + // set the default windowid + this->WindowId = this->NextWindowId; +- this->NextWindowId = static_cast(NULL); ++ this->NextWindowId = static_cast(0); + + // set everything up again + this->Initialize(); -- cgit v1.2.3