From e9c4847a829d494f5644d027381b8b8a84df215a Mon Sep 17 00:00:00 2001
From: Sean McBride <sean@rogue-research.com>
Date: Fri, 11 May 2018 09:50:41 -0400
Subject: [PATCH] Change Allocate() method return type from int to vtkTypeBool

int Allocate(vtkIdType
->
vtkTypeBool Allocate(vtkIdType

int +(.*)::Allocate\(vtkIdType
->
vtkTypeBool \1::Allocate\(vtkIdType
---
 Common/Core/Testing/Cxx/TestDataArrayAPI.cxx.in    | 4 ++--
 Common/Core/Testing/Cxx/TestDataArrayIterators.cxx | 2 +-
 Common/Core/Testing/Cxx/TestVariantArray.cxx       | 2 +-
 Common/Core/vtkAbstractArray.h                     | 2 +-
 Common/Core/vtkBitArray.cxx                        | 2 +-
 Common/Core/vtkBitArray.h                          | 2 +-
 Common/Core/vtkGenericDataArray.h                  | 2 +-
 Common/Core/vtkPoints.cxx                          | 2 +-
 Common/Core/vtkPoints.h                            | 2 +-
 Common/Core/vtkPoints2D.cxx                        | 2 +-
 Common/Core/vtkPoints2D.h                          | 2 +-
 Common/Core/vtkStringArray.cxx                     | 2 +-
 Common/Core/vtkTypedDataArray.h                    | 2 +-
 Common/Core/vtkUnicodeStringArray.cxx              | 2 +-
 Common/Core/vtkUnicodeStringArray.h                | 2 +-
 Common/Core/vtkVariantArray.cxx                    | 2 +-
 Common/Core/vtkVariantArray.h                      | 2 +-
 Common/Core/vtkVoidArray.cxx                       | 2 +-
 Common/Core/vtkVoidArray.h                         | 2 +-
 Common/DataModel/vtkCellArray.h                    | 2 +-
 Common/DataModel/vtkFieldData.cxx                  | 2 +-
 Common/DataModel/vtkFieldData.h                    | 2 +-
 Common/DataModel/vtkPeriodicDataArray.h            | 2 +-
 Domains/Chemistry/vtkBlueObeliskData.cxx           | 2 +-
 Domains/Chemistry/vtkBlueObeliskData.h             | 2 +-
 IO/Exodus/vtkCPExodusIINodalCoordinatesTemplate.h  | 2 +-
 IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h      | 2 +-
 27 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/Common/Core/Testing/Cxx/TestDataArrayAPI.cxx.in b/Common/Core/Testing/Cxx/TestDataArrayAPI.cxx.in
index 18c3d07e7dc..0671fe5a72f 100644
--- a/Common/Core/Testing/Cxx/TestDataArrayAPI.cxx.in
+++ b/Common/Core/Testing/Cxx/TestDataArrayAPI.cxx.in
@@ -161,7 +161,7 @@ vtkSmartPointer<vtkDataArray> CreateDataArray()
 
 //------------------------vtkAbstactArray API-----------------------------------
 
-// int Allocate(vtkIdType numValues, vtkIdType ext=1000)
+// vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000)
 // Sets MaxId == -1
 // Sets Size >= numValues
 // If numValues == 0, delete the array.
@@ -170,7 +170,7 @@ vtkSmartPointer<vtkDataArray> CreateDataArray()
 template <typename ScalarT, typename ArrayT>
 int Test_int_Allocate_numValues_ext()
 {
-  DataArrayAPIInit("int Allocate(vtkIdType numValues, vtkIdType ext)");
+  DataArrayAPIInit("vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext)");
   DataArrayAPICreateTestArray(array);
 
   int success = array->Allocate(0);
diff --git a/Common/Core/Testing/Cxx/TestDataArrayIterators.cxx b/Common/Core/Testing/Cxx/TestDataArrayIterators.cxx
index bb72c66ecab..97fa24d1552 100644
--- a/Common/Core/Testing/Cxx/TestDataArrayIterators.cxx
+++ b/Common/Core/Testing/Cxx/TestDataArrayIterators.cxx
@@ -57,7 +57,7 @@ public:
   void GetTypedTuple(vtkIdType, ValueType*) const override {}
   vtkIdType InsertNextValue(ValueType) override { return 0; }
   void InsertValue(vtkIdType, ValueType) override {}
-  int Allocate(vtkIdType, vtkIdType) override { return 0; }
+  vtkTypeBool Allocate(vtkIdType, vtkIdType) override { return 0; }
   int Resize(vtkIdType) override { return 0; }
 };
 }
diff --git a/Common/Core/Testing/Cxx/TestVariantArray.cxx b/Common/Core/Testing/Cxx/TestVariantArray.cxx
index 34b86acce24..5ff64a05be9 100644
--- a/Common/Core/Testing/Cxx/TestVariantArray.cxx
+++ b/Common/Core/Testing/Cxx/TestVariantArray.cxx
@@ -134,7 +134,7 @@ int TestVariantArray(int, char*[])
   vector<double> vec;
 
   // Resizing
-  // * int Allocate(vtkIdType sz);
+  // * vtkTypeBool Allocate(vtkIdType sz);
   // * void Initialize();
   // * void SetNumberOfTuples(vtkIdType number);
   // * void Squeeze();
diff --git a/Common/Core/vtkAbstractArray.h b/Common/Core/vtkAbstractArray.h
index 19bf2f5c799..e74eb4374f9 100644
--- a/Common/Core/vtkAbstractArray.h
+++ b/Common/Core/vtkAbstractArray.h
@@ -86,7 +86,7 @@ public:
    * If numValues is 0, all memory will be freed.
    * Return 1 on success, 0 on failure.
    */
-  virtual int Allocate(vtkIdType numValues, vtkIdType ext=1000) = 0;
+  virtual vtkTypeBool Allocate(vtkIdType numValues, vtkIdType ext=1000) = 0;
 
   /**
    * Release storage and reset array to initial state.
diff --git a/Common/Core/vtkBitArray.cxx b/Common/Core/vtkBitArray.cxx
index 7cd1f4b2bf1..64a5e01754b 100644
--- a/Common/Core/vtkBitArray.cxx
+++ b/Common/Core/vtkBitArray.cxx
@@ -156,7 +156,7 @@ int vtkBitArray::GetValue(vtkIdType id)
 
 //----------------------------------------------------------------------------
 // Allocate memory for this array. Delete old storage only if necessary.
-int vtkBitArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
+vtkTypeBool vtkBitArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
 {
   if ( sz > this->Size )
   {
diff --git a/Common/Core/vtkBitArray.h b/Common/Core/vtkBitArray.h
index 5500f46f43c..a7ec764c9ec 100644
--- a/Common/Core/vtkBitArray.h
+++ b/Common/Core/vtkBitArray.h
@@ -49,7 +49,7 @@ public:
    * Allocate memory for this array. Delete old storage only if necessary.
    * Note that ext is no longer used.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
 
   /**
    * Release storage and reset array to initial state.
diff --git a/Common/Core/vtkGenericDataArray.h b/Common/Core/vtkGenericDataArray.h
index bf87eeaafb7..b05a76a99b5 100644
--- a/Common/Core/vtkGenericDataArray.h
+++ b/Common/Core/vtkGenericDataArray.h
@@ -252,7 +252,7 @@ public:
   int GetDataType() override;
   int GetDataTypeSize() override;
   bool HasStandardMemoryLayout() override;
-  int Allocate(vtkIdType size, vtkIdType ext = 1000) override;
+  vtkTypeBool Allocate(vtkIdType size, vtkIdType ext = 1000) override;
   int Resize(vtkIdType numTuples) override;
   void SetNumberOfComponents(int num) override;
   void SetNumberOfTuples(vtkIdType number) override;
diff --git a/Common/Core/vtkPoints.cxx b/Common/Core/vtkPoints.cxx
index 60f02e8acc5..01f84fe301a 100644
--- a/Common/Core/vtkPoints.cxx
+++ b/Common/Core/vtkPoints.cxx
@@ -115,7 +115,7 @@ vtkMTimeType vtkPoints::GetMTime()
   return doTime;
 }
 
-int vtkPoints::Allocate(vtkIdType sz, vtkIdType ext)
+vtkTypeBool vtkPoints::Allocate(vtkIdType sz, vtkIdType ext)
 {
   int numComp = this->Data->GetNumberOfComponents();
   return this->Data->Allocate(sz * numComp, ext * numComp);
diff --git a/Common/Core/vtkPoints.h b/Common/Core/vtkPoints.h
index 31f3b7f080b..7b2384e1bbd 100644
--- a/Common/Core/vtkPoints.h
+++ b/Common/Core/vtkPoints.h
@@ -44,7 +44,7 @@ public:
   /**
    * Allocate initial memory size. ext is no longer used.
    */
-  virtual int Allocate(vtkIdType sz, vtkIdType ext = 1000);
+  virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext = 1000);
 
   /**
    * Return object to instantiated state.
diff --git a/Common/Core/vtkPoints2D.cxx b/Common/Core/vtkPoints2D.cxx
index 8d122b9d625..4da3c85b9f4 100644
--- a/Common/Core/vtkPoints2D.cxx
+++ b/Common/Core/vtkPoints2D.cxx
@@ -126,7 +126,7 @@ void vtkPoints2D::GetBounds(double bounds[4])
   memcpy(bounds, this->Bounds, 4 * sizeof(double));
 }
 
-int vtkPoints2D::Allocate(vtkIdType sz, vtkIdType ext)
+vtkTypeBool vtkPoints2D::Allocate(vtkIdType sz, vtkIdType ext)
 {
   int numComp = this->Data->GetNumberOfComponents();
   return this->Data->Allocate(sz * numComp, ext * numComp);
diff --git a/Common/Core/vtkPoints2D.h b/Common/Core/vtkPoints2D.h
index 04a7797fbcc..17a663306fd 100644
--- a/Common/Core/vtkPoints2D.h
+++ b/Common/Core/vtkPoints2D.h
@@ -44,7 +44,7 @@ public:
   /**
    * Allocate initial memory size. ext is no longer used.
    */
-  virtual int Allocate(vtkIdType sz, vtkIdType ext = 1000);
+  virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext = 1000);
 
   /**
    * Return object to instantiated state.
diff --git a/Common/Core/vtkStringArray.cxx b/Common/Core/vtkStringArray.cxx
index a62e6c798c3..b1870536f70 100644
--- a/Common/Core/vtkStringArray.cxx
+++ b/Common/Core/vtkStringArray.cxx
@@ -165,7 +165,7 @@ void vtkStringArray::SetArrayFreeFunction(void (*callback)(void *))
 //-----------------------------------------------------------------------------
 // Allocate memory for this array. Delete old storage only if necessary.
 
-int vtkStringArray::Allocate(vtkIdType sz, vtkIdType)
+vtkTypeBool vtkStringArray::Allocate(vtkIdType sz, vtkIdType)
 {
   if(sz > this->Size)
   {
diff --git a/Common/Core/vtkTypedDataArray.h b/Common/Core/vtkTypedDataArray.h
index 6889ca85e8e..7b16d9ac140 100644
--- a/Common/Core/vtkTypedDataArray.h
+++ b/Common/Core/vtkTypedDataArray.h
@@ -158,7 +158,7 @@ public:
   // Reintroduced as pure virtual since the base vtkGenericDataArray method
   // requires new allocation/resize APIs, though existing MappedDataArrays
   // would just use the vtkDataArray-level virtuals.
-  int Allocate(vtkIdType size, vtkIdType ext = 1000) override = 0;
+  vtkTypeBool Allocate(vtkIdType size, vtkIdType ext = 1000) override = 0;
   int Resize(vtkIdType numTuples) override = 0;
 
 protected:
diff --git a/Common/Core/vtkUnicodeStringArray.cxx b/Common/Core/vtkUnicodeStringArray.cxx
index 204abb60b48..2c83bcc47d6 100644
--- a/Common/Core/vtkUnicodeStringArray.cxx
+++ b/Common/Core/vtkUnicodeStringArray.cxx
@@ -47,7 +47,7 @@ void vtkUnicodeStringArray::PrintSelf(ostream& os, vtkIndent indent)
   this->Superclass::PrintSelf(os,indent);
 }
 
-int vtkUnicodeStringArray::Allocate(vtkIdType sz, vtkIdType)
+vtkTypeBool vtkUnicodeStringArray::Allocate(vtkIdType sz, vtkIdType)
 {
   this->Internal->Storage.reserve(sz);
   this->DataChanged();
diff --git a/Common/Core/vtkUnicodeStringArray.h b/Common/Core/vtkUnicodeStringArray.h
index a61a41e0c97..a7a4ee701a5 100644
--- a/Common/Core/vtkUnicodeStringArray.h
+++ b/Common/Core/vtkUnicodeStringArray.h
@@ -44,7 +44,7 @@ public:
   vtkTypeMacro(vtkUnicodeStringArray,vtkAbstractArray);
   void PrintSelf(ostream& os, vtkIndent indent) override;
 
-  int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
   void Initialize() override;
   int GetDataType() override;
   int GetDataTypeSize() override;
diff --git a/Common/Core/vtkVariantArray.cxx b/Common/Core/vtkVariantArray.cxx
index 7eff7bc94c0..7e4492bde17 100644
--- a/Common/Core/vtkVariantArray.cxx
+++ b/Common/Core/vtkVariantArray.cxx
@@ -122,7 +122,7 @@ vtkVariantArray::~vtkVariantArray()
 //
 
 //----------------------------------------------------------------------------
-int vtkVariantArray::Allocate(vtkIdType sz, vtkIdType)
+vtkTypeBool vtkVariantArray::Allocate(vtkIdType sz, vtkIdType)
 {
   if(sz > this->Size)
   {
diff --git a/Common/Core/vtkVariantArray.h b/Common/Core/vtkVariantArray.h
index dd90d498026..c2e205db50b 100644
--- a/Common/Core/vtkVariantArray.h
+++ b/Common/Core/vtkVariantArray.h
@@ -67,7 +67,7 @@ public:
    * Allocate memory for this array. Delete old storage only if necessary.
    * Note that ext is no longer used.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext=1000) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override;
 
   /**
    * Release storage and reset array to initial state.
diff --git a/Common/Core/vtkVoidArray.cxx b/Common/Core/vtkVoidArray.cxx
index 35fd0f0690e..d763bbb269c 100644
--- a/Common/Core/vtkVoidArray.cxx
+++ b/Common/Core/vtkVoidArray.cxx
@@ -31,7 +31,7 @@ vtkVoidArray::~vtkVoidArray()
 }
 
 // Allocate memory for this array. Delete old storage only if necessary.
-int vtkVoidArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
+vtkTypeBool vtkVoidArray::Allocate(vtkIdType sz, vtkIdType vtkNotUsed(ext))
 {
   if ( sz > this->Size || this->Array != nullptr )
   {
diff --git a/Common/Core/vtkVoidArray.h b/Common/Core/vtkVoidArray.h
index 9e716f19de4..d6ff31785bd 100644
--- a/Common/Core/vtkVoidArray.h
+++ b/Common/Core/vtkVoidArray.h
@@ -42,7 +42,7 @@ public:
    * Allocate memory for this array. Delete old storage only if necessary.
    * Note that the parameter ext is no longer used.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext=1000);
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
 
   /**
    * Release storage and reset array to initial state.
diff --git a/Common/DataModel/vtkCellArray.h b/Common/DataModel/vtkCellArray.h
index a79b6a620af..ae850954ee0 100644
--- a/Common/DataModel/vtkCellArray.h
+++ b/Common/DataModel/vtkCellArray.h
@@ -55,7 +55,7 @@ public:
   /**
    * Allocate memory and set the size to extend by.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext=1000)
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000)
     {return this->Ia->Allocate(sz,ext);}
 
   /**
diff --git a/Common/DataModel/vtkFieldData.cxx b/Common/DataModel/vtkFieldData.cxx
index c1d5d5d3225..f669d98d9bb 100644
--- a/Common/DataModel/vtkFieldData.cxx
+++ b/Common/DataModel/vtkFieldData.cxx
@@ -240,7 +240,7 @@ void vtkFieldData::Initialize()
 
 //----------------------------------------------------------------------------
 // Allocate data for each array.
-int vtkFieldData::Allocate(vtkIdType sz, vtkIdType ext)
+vtkTypeBool vtkFieldData::Allocate(vtkIdType sz, vtkIdType ext)
 {
   int i;
   int status = 0;
diff --git a/Common/DataModel/vtkFieldData.h b/Common/DataModel/vtkFieldData.h
index 10e023b31f9..be46beee8ca 100644
--- a/Common/DataModel/vtkFieldData.h
+++ b/Common/DataModel/vtkFieldData.h
@@ -68,7 +68,7 @@ public:
    * Allocate data for each array.
    * Note that ext is no longer used.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext=1000);
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
 
   /**
    * Copy data array structure from a given field.  The same arrays
diff --git a/Common/DataModel/vtkPeriodicDataArray.h b/Common/DataModel/vtkPeriodicDataArray.h
index a96834bfd83..dbb43c0840e 100644
--- a/Common/DataModel/vtkPeriodicDataArray.h
+++ b/Common/DataModel/vtkPeriodicDataArray.h
@@ -148,7 +148,7 @@ public:
   /**
    * Read only container, not supported.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override;
 
   /**
    * Read only container, not supported.
diff --git a/Domains/Chemistry/vtkBlueObeliskData.cxx b/Domains/Chemistry/vtkBlueObeliskData.cxx
index 3552c2bcebd..95fc5a197b3 100644
--- a/Domains/Chemistry/vtkBlueObeliskData.cxx
+++ b/Domains/Chemistry/vtkBlueObeliskData.cxx
@@ -381,7 +381,7 @@ bool vtkBlueObeliskData::GenerateHeaderFromXML(std::istream &xml,
 }
 
 //----------------------------------------------------------------------------
-int vtkBlueObeliskData::Allocate(vtkIdType sz, vtkIdType ext)
+vtkTypeBool vtkBlueObeliskData::Allocate(vtkIdType sz, vtkIdType ext)
 {
   for (MyStdVectorOfVtkAbstractArrays::iterator it = this->Arrays->begin(),
          it_end = this->Arrays->end(); it != it_end; ++it)
diff --git a/Domains/Chemistry/vtkBlueObeliskData.h b/Domains/Chemistry/vtkBlueObeliskData.h
index 53f7eec2a28..ef61c766ffb 100644
--- a/Domains/Chemistry/vtkBlueObeliskData.h
+++ b/Domains/Chemistry/vtkBlueObeliskData.h
@@ -131,7 +131,7 @@ class VTKDOMAINSCHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject
    * Allocate enough memory in each array for sz elements. ext is not
    * used.
    */
-  virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
+  virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
 
   /**
    * Reset each array.
diff --git a/IO/Exodus/vtkCPExodusIINodalCoordinatesTemplate.h b/IO/Exodus/vtkCPExodusIINodalCoordinatesTemplate.h
index 1880a355033..f5716c36014 100644
--- a/IO/Exodus/vtkCPExodusIINodalCoordinatesTemplate.h
+++ b/IO/Exodus/vtkCPExodusIINodalCoordinatesTemplate.h
@@ -75,7 +75,7 @@ public:
    * This container is read only -- this method does nothing but print a
    * warning.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override;
   int Resize(vtkIdType numTuples) override;
   void SetNumberOfTuples(vtkIdType number) override;
   void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override;
diff --git a/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h b/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h
index 2dd328bc6a6..a9c365163ba 100644
--- a/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h
+++ b/IO/Exodus/vtkCPExodusIIResultsArrayTemplate.h
@@ -77,7 +77,7 @@ public:
    * This container is read only -- this method does nothing but print a
    * warning.
    */
-  int Allocate(vtkIdType sz, vtkIdType ext) override;
+  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override;
   int Resize(vtkIdType numTuples) override;
   void SetNumberOfTuples(vtkIdType number) override;
   void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override;
-- 
GitLab