An update will be applied January 25th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 6beda6f0 authored by Sean McBride's avatar Sean McBride
Browse files

Fixed -Wshift-sign-overflow warning

Shifting a 1 bit into or past the sign bit is undefined behaviour.
Instead, just use the new VTK_ID_MIN constant.

Change-Id: If58da9863e2264c886957d214aa4086e4fb25c81
parent 11e36798
......@@ -188,7 +188,7 @@ void vtkDistributedGraphHelper::AttachToGraph(vtkGraph *graph)
}
if (numProcs == 1) numProcBits = 1;
this->signBitMask = static_cast<vtkIdType>(1) << ((sizeof(vtkIdType) * CHAR_BIT) - 1);
this->signBitMask = VTK_ID_MIN;
this->highBitShiftMask = static_cast<vtkIdType>(1) << numProcBits;
this->procBits = numProcBits + 1;
this->indexBits = (sizeof(vtkIdType) * CHAR_BIT) - (numProcBits + 1);
......
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