| 95 | // Generic implementation: |
| 96 | template <typename SrcArrayT, typename DstArrayT> |
| 97 | void DoGenericCopy(SrcArrayT* src, DstArrayT* dst) const |
| 98 | { |
| 99 | const auto srcRange = vtk::DataArrayValueRange(src); |
| 100 | auto dstRange = vtk::DataArrayValueRange(dst); |
| 101 | |
| 102 | using DstT = typename decltype(dstRange)::ValueType; |
| 103 | auto destIter = dstRange.begin(); |
| 104 | // use for loop instead of copy to avoid -Wconversion warnings |
| 105 | for (auto v = srcRange.cbegin(); v != srcRange.cend(); ++v, ++destIter) |
| 106 | { |
| 107 | *destIter = static_cast<DstT>(*v); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // These overloads are split so that the above specializations will be |
| 112 | // used properly. |
no test coverage detected