@@ -108,7 +108,10 @@ class OpenGlContext::Impl {
108108 True,
109109 None};
110110 int fb_count = 0 ;
111+ #pragma GCC diagnostic push
112+ #pragma GCC diagnostic ignored "-Wold-style-cast"
111113 const int screen_id = DefaultScreen (display ());
114+ #pragma GCC diagnostic pop
112115
113116 // No matter what, we want to make sure that the context is not current
114117 // at the conclusion of construction.
@@ -149,8 +152,11 @@ class OpenGlContext::Impl {
149152 bool is_complete = false ;
150153
151154 // This requires a call to XFreeColormap in the destructor.
155+ #pragma GCC diagnostic push
156+ #pragma GCC diagnostic ignored "-Wold-style-cast"
152157 window_attribs.colormap = vtkXCreateColormap (
153158 display (), RootWindow (display (), screen_id), visual->visual , AllocNone);
159+ #pragma GCC diagnostic pop
154160 ScopeExit colormap_guard (
155161 [colormap = window_attribs.colormap , &is_complete]() {
156162 if (!is_complete) vtkXFreeColormap (display (), colormap);
@@ -160,10 +166,13 @@ class OpenGlContext::Impl {
160166 // redrawn.
161167 window_attribs.event_mask = ExposureMask;
162168 // This requires a call to XDestroyWindow in the destructor.
169+ #pragma GCC diagnostic push
170+ #pragma GCC diagnostic ignored "-Wold-style-cast"
163171 window_ = vtkXCreateWindow (display (), RootWindow (display (), screen_id), 0 ,
164172 0 , window_width_, window_height_, 0 ,
165173 visual->depth , InputOutput, visual->visual ,
166174 CWColormap | CWEventMask, &window_attribs);
175+ #pragma GCC diagnostic pop
167176 ScopeExit window_guard ([window = window_, &is_complete]() {
168177 if (!is_complete) vtkXDestroyWindow (display (), window);
169178 });
0 commit comments