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:
Kenneth Moreland 2014-06-09 16:32:02 -06:00
parent da68debbf3
commit 744d97229f
2 changed files with 4 additions and 4 deletions

@ -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