Commit 322410ee authored by Sean McBride's avatar Sean McBride

Introduce typedef unsigned int vtkTypeUBool

Used regex:

vtkBooleanMacro.*unsigned int\)

to make use of vtkTypeUBool.

Eventually it should be changed to real bool.
parent e3cce433
......@@ -60,15 +60,17 @@
/*--------------------------------------------------------------------------*/
/* If not already defined, define vtkTypeBool. When VTK was started, some */
/* compilers did not yet support the bool type, and so VTK often used int */
/* where it should have used bool. Eventually vtkTypeBool will switch to */
/* real bool. */
/* compilers did not yet support the bool type, and so VTK often used int, */
/* or more rarely unsigned int, where it should have used bool. */
/* Eventually vtkTypeBool will switch to real bool. */
#ifndef VTK_TYPE_BOOL_TYPEDEFED
# define VTK_TYPE_BOOL_TYPEDEFED
# if 1
typedef int vtkTypeBool;
typedef unsigned int vtkTypeUBool;
# else
typedef bool vtkTypeBool;
typedef bool vtkTypeUBool;
# endif
#endif
......
......@@ -359,15 +359,17 @@ typedef int vtkIdType;
/*--------------------------------------------------------------------------*/
/* If not already defined, define vtkTypeBool. When VTK was started, some */
/* compilers did not yet support the bool type, and so VTK often used int */
/* where it should have used bool. Eventually vtkTypeBool will switch to */
/* real bool. */
/* compilers did not yet support the bool type, and so VTK often used int, */
/* or more rarely unsigned int, where it should have used bool. */
/* Eventually vtkTypeBool will switch to real bool. */
#ifndef VTK_TYPE_BOOL_TYPEDEFED
# define VTK_TYPE_BOOL_TYPEDEFED
# if 1
typedef int vtkTypeBool;
typedef unsigned int vtkTypeUBool;
# else
typedef bool vtkTypeBool;
typedef bool vtkTypeUBool;
# endif
#endif
......
......@@ -42,9 +42,9 @@ public:
/**
* Write the image to memory (a vtkUnsignedCharArray)
*/
vtkSetMacro(WriteToMemory, unsigned int);
vtkGetMacro(WriteToMemory, unsigned int);
vtkBooleanMacro(WriteToMemory, unsigned int);
vtkSetMacro(WriteToMemory, vtkTypeUBool);
vtkGetMacro(WriteToMemory, vtkTypeUBool);
vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
//@}
//@{
......
......@@ -117,7 +117,7 @@ protected:
// Required for subclasses that need to prevent the writer
// from touching the file system. The getter/setter are only
// available in these subclasses.
unsigned int WriteToMemory;
vtkTypeUBool WriteToMemory;
// subclasses that do write to memory can override this
// to implement the simple case
......
......@@ -57,18 +57,18 @@ public:
/**
* Progressive JPEG generation.
*/
vtkSetMacro(Progressive, unsigned int);
vtkGetMacro(Progressive, unsigned int);
vtkBooleanMacro(Progressive, unsigned int);
vtkSetMacro(Progressive, vtkTypeUBool);
vtkGetMacro(Progressive, vtkTypeUBool);
vtkBooleanMacro(Progressive, vtkTypeUBool);
//@}
//@{
/**
* Write the image to memory (a vtkUnsignedCharArray)
*/
vtkSetMacro(WriteToMemory, unsigned int);
vtkGetMacro(WriteToMemory, unsigned int);
vtkBooleanMacro(WriteToMemory, unsigned int);
vtkSetMacro(WriteToMemory, vtkTypeUBool);
vtkGetMacro(WriteToMemory, vtkTypeUBool);
vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
//@}
//@{
......@@ -88,7 +88,7 @@ protected:
private:
int Quality;
unsigned int Progressive;
vtkTypeUBool Progressive;
vtkUnsignedCharArray *Result;
FILE *TempFP;
......
......@@ -60,9 +60,9 @@ public:
/**
* Write the image to memory (a vtkUnsignedCharArray)
*/
vtkSetMacro(WriteToMemory, unsigned int);
vtkGetMacro(WriteToMemory, unsigned int);
vtkBooleanMacro(WriteToMemory, unsigned int);
vtkSetMacro(WriteToMemory, vtkTypeUBool);
vtkGetMacro(WriteToMemory, vtkTypeUBool);
vtkBooleanMacro(WriteToMemory, vtkTypeUBool);
//@}
//@{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment