void-packages/srcpkgs/paraview/patches/vtk-isnan.patch

46 lines
1.3 KiB
Diff

--- VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2020-08-04 22:12:01.000000000 +0200
+++ VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2020-08-29 22:33:06.824012475 +0200
@@ -36,20 +36,20 @@
template <typename T>
struct has_NaN<T, true>
{
- static bool isnan(T x) { return std::isnan(x); }
+ static bool vtkisnan(T x) { return std::isnan(x); }
};
template <typename T>
struct has_NaN<T, false>
{
- static bool isnan(T) { return false; }
+ static bool vtkisnan(T) { return false; }
};
template <typename T>
-bool isnan(T x)
+bool vtkisnan(T x)
{
// Select the correct partially specialized type.
- return has_NaN<T, std::numeric_limits<T>::has_quiet_NaN>::isnan(x);
+ return has_NaN<T, std::numeric_limits<T>::has_quiet_NaN>::vtkisnan(x);
}
} // namespace detail
@@ -127,7 +127,7 @@
for (vtkIdType i = 0; i < num; ++i)
{
auto value = this->AssociatedArray->GetValue(i);
- if (::detail::isnan(value))
+ if (::detail::vtkisnan(value))
{
NanIndices.push_back(i);
}
@@ -140,7 +140,7 @@
std::vector<vtkIdType>* FindIndexVec(ValueType value)
{
std::vector<vtkIdType>* indices{ nullptr };
- if (::detail::isnan(value) && !this->NanIndices.empty())
+ if (::detail::vtkisnan(value) && !this->NanIndices.empty())
{
indices = &this->NanIndices;
}