------------------------------------------------------------------------------
| 1036 | |
| 1037 | //------------------------------------------------------------------------------ |
| 1038 | void vtkVariantArray::DataElementChanged(vtkIdType id) |
| 1039 | { |
| 1040 | if (this->Lookup) |
| 1041 | { |
| 1042 | if (this->Lookup->Rebuild) |
| 1043 | { |
| 1044 | // We're already going to rebuild the lookup table. Do nothing. |
| 1045 | return; |
| 1046 | } |
| 1047 | |
| 1048 | if (this->Lookup->CachedUpdates.size() > static_cast<size_t>(this->GetNumberOfTuples() / 10)) |
| 1049 | { |
| 1050 | // At this point, just rebuild the full table. |
| 1051 | this->Lookup->Rebuild = true; |
| 1052 | } |
| 1053 | else |
| 1054 | { |
| 1055 | // Insert this change into the set of cached updates |
| 1056 | std::pair<const ValueType, vtkIdType> value(this->GetValue(id), id); |
| 1057 | this->Lookup->CachedUpdates.insert(value); |
| 1058 | } |
| 1059 | } |
| 1060 | } |
| 1061 | |
| 1062 | //------------------------------------------------------------------------------ |
| 1063 | void vtkVariantArray::ClearLookup() |
no test coverage detected