Commit 15c984ae authored by Charles Law's avatar Charles Law
Browse files

BUG: This should fix the VS60 issue.

parent fe5fe8e9
......@@ -111,7 +111,7 @@ void vtkHyperOctree::PrintSelf(ostream& os, vtkIndent indent)
}
vtkCxxRevisionMacro(vtkHyperOctreeInternal, "1.14");
vtkCxxRevisionMacro(vtkHyperOctreeInternal, "1.15");
template<unsigned int D> class vtkCompactHyperOctree;
template<unsigned int D> class vtkCompactHyperOctreeNode;
......@@ -514,13 +514,13 @@ private:
void operator=(const vtkCompactHyperOctreeCursor<D> &); // Not implemented.
};
// vtkCxxRevisionMacro(vtkCompactHyperOctreeCursor, "1.14");
// vtkCxxRevisionMacro(vtkCompactHyperOctreeCursor, "1.15");
template<unsigned int D>
void vtkCompactHyperOctreeCursor<D>::CollectRevisions(ostream& sos)
{
vtkOStreamWrapper os(sos);
this->Superclass::CollectRevisions(os);
os << "vtkCompactHyperOctreeCursor<" << D <<"> " << "1.14" << '\n';
os << "vtkCompactHyperOctreeCursor<" << D <<"> " << "1.15" << '\n';
}
......@@ -652,7 +652,7 @@ protected:
int Children[1<<D]; // indices
};
//vtkCxxRevisionMacro(vtkCompactHyperOctree, "1.14");
//vtkCxxRevisionMacro(vtkCompactHyperOctree, "1.15");
template<unsigned int D> class vtkCompactHyperOctree
: public vtkHyperOctreeInternal
......@@ -957,13 +957,13 @@ private:
void operator=(const vtkCompactHyperOctree<D> &); // Not implemented.
};
// vtkCxxRevisionMacro(vtkCompactHyperOctree, "1.14");
// vtkCxxRevisionMacro(vtkCompactHyperOctree, "1.15");
template<unsigned int D>
void vtkCompactHyperOctree<D>::CollectRevisions(ostream& sos)
{
vtkOStreamWrapper os(sos);
this->Superclass::CollectRevisions(os);
os << "vtkCompactHyperOctree<" << D <<"> " << "1.14" << '\n';
os << "vtkCompactHyperOctree<" << D <<"> " << "1.15" << '\n';
}
......@@ -971,7 +971,7 @@ void vtkCompactHyperOctree<D>::CollectRevisions(ostream& sos)
// quadtree: vtkHyperOctreeInternal<2>
// bittree: vtkHyperOctreeInternal<1>
vtkCxxRevisionMacro(vtkHyperOctree, "1.14");
vtkCxxRevisionMacro(vtkHyperOctree, "1.15");
vtkStandardNewMacro(vtkHyperOctree);
//-----------------------------------------------------------------------------
......@@ -2714,6 +2714,8 @@ void vtkHyperOctree::UpdateDualArrays()
xyzIds[0] = xyzIds[1] = xyzIds[2] = 0;
this->TraverseDualRecursively(neighborhood, xyzIds, 0);
this->CornerLeafIds->Squeeze();
//timer->StopTimer();
//cout << "Internal dual update : " << timer->GetElapsedTime() << endl;
//timer->Delete();
......@@ -2962,8 +2964,8 @@ void vtkHyperOctree::TraverseGridRecursively(
int child;
int numChildren = 1 <<this->GetDimension();
int neighbor;
unsigned char tChild, tParent;
unsigned char* traversalTable = this->NeighborhoodTraversalTable;
int tChild, tParent; // used to be uchar with uchar table. VS60 bug
int* traversalTable = this->NeighborhoodTraversalTable;
for (child = 0; child < numChildren; ++child)
{
// Compute origin for child
......@@ -3577,8 +3579,8 @@ void vtkHyperOctree::TraverseDualRecursively(
unsigned char numChildren = 1 << this->Dimension;
unsigned char child;
unsigned char neighbor;
unsigned char tChild, tParent;
unsigned char* traversalTable = this->NeighborhoodTraversalTable;
int tChild, tParent; // used to be uchar, but VS60 had a bug.
int* traversalTable = this->NeighborhoodTraversalTable;
vtkHyperOctreeLightWeightCursor newNeighborhood[8];
// Storing 4 per neighbor for efficiency.
// This might also be useful for 4d trees :)
......
......@@ -519,7 +519,8 @@ protected:
// First three bits encode the child, rest encode the cursor id.
// 8xCursorId + childId.
// This will be shorter when we get rid of the 3x3x3 neighborhood.
unsigned char NeighborhoodTraversalTable[216];
// I was using unsigned char, but VS60 optimized build had a problem.
int NeighborhoodTraversalTable[216];
void GenerateGridNeighborhoodTraversalTable();
void GenerateDualNeighborhoodTraversalTable();
......
Supports Markdown
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