mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Changed undefined macros to something other than zero.
Previously, VTKM_DEVICE_ADAPTER_UNDEFINED and VTKM_ARRAY_CONTAINER_CONTROL_UNDEFINED were set to 0. The problem is that if someone set VTKM_DEVICE_ADAPTER or VTKM_ARRAY_CONTAINER_CONTROL to something invalid, that would test positive when compared to 0. Thus, you get an error about not defining the default when in fact the problem is setting an invalid flag. This change makes the undefined constants -1 so that the comparison will fail unless the macro is actually properly set.
This commit is contained in:
parent
da68debbf3
commit
744d97229f
@ -20,8 +20,8 @@
|
||||
#ifndef vtk_m_cont__ArrayContainerControl_h
|
||||
#define vtk_m_cont__ArrayContainerControl_h
|
||||
|
||||
#define VTKM_ARRAY_CONTAINER_CONTROL_ERROR -1
|
||||
#define VTKM_ARRAY_CONTAINER_CONTROL_UNDEFINED 0
|
||||
#define VTKM_ARRAY_CONTAINER_CONTROL_ERROR -2
|
||||
#define VTKM_ARRAY_CONTAINER_CONTROL_UNDEFINED -1
|
||||
#define VTKM_ARRAY_CONTAINER_CONTROL_BASIC 1
|
||||
|
||||
#ifndef VTKM_ARRAY_CONTAINER_CONTROL
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#define VTKM_DEVICE_ADAPTER_ERROR -1
|
||||
#define VTKM_DEVICE_ADAPTER_UNDEFINED 0
|
||||
#define VTKM_DEVICE_ADAPTER_ERROR -2
|
||||
#define VTKM_DEVICE_ADAPTER_UNDEFINED -1
|
||||
#define VTKM_DEVICE_ADAPTER_SERIAL 1
|
||||
|
||||
#ifndef VTKM_DEVICE_ADAPTER
|
||||
|
Loading…
Reference in New Issue
Block a user