------------------------------------------------------------------------------
| 724 | |
| 725 | //------------------------------------------------------------------------------ |
| 726 | void vtkDataArray::FillComponent(int compIdx, double value) |
| 727 | { |
| 728 | if (compIdx < 0 || compIdx >= this->GetNumberOfComponents()) |
| 729 | { |
| 730 | vtkErrorMacro(<< "Specified component " << compIdx << " is not in [0, " |
| 731 | << this->GetNumberOfComponents() << ")"); |
| 732 | return; |
| 733 | } |
| 734 | |
| 735 | // Xcode 8.2 calls GetNumberOfTuples() after each iteration. |
| 736 | // Prevent this by storing the result in a local variable. |
| 737 | vtkIdType numberOfTuples = this->GetNumberOfTuples(); |
| 738 | for (vtkIdType i = 0; i < numberOfTuples; i++) |
| 739 | { |
| 740 | this->SetComponent(i, compIdx, value); |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | //------------------------------------------------------------------------------ |
| 745 | void vtkDataArray::Fill(double value) |