Skip to content

Commit

Permalink
Fix implementation of CurveData<T> with RawBuffer. (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
poirierlouis authored May 23, 2024
1 parent e5f9b10 commit d962648
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/RED4ext/NativeTypes-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ RED4EXT_INLINE RED4ext::CurvePoint<T> RED4ext::CurveData<T>::GetPoint(uint32_t a
{
return {.point = std::numeric_limits<float>::infinity(), .value = T()};
}
const CurveBuffer<T>* curve = GetCurve();
const float* points = curve->GetPoints();
const T* values = curve->GetValues();
CurveBuffer<T>* curve = GetCurve();
float* points = curve->GetPoints();
T* values = curve->GetValues();

return {points[aIndex], values[aIndex]};
}
Expand All @@ -340,7 +340,7 @@ RED4EXT_INLINE void RED4ext::CurveData<T>::SetPoint(uint32_t aIndex, float aPoin
{
return;
}
const CurveBuffer<T>* curve = GetCurve();
CurveBuffer<T>* curve = GetCurve();
float* points = curve->GetPoints();
T* values = curve->GetValues();

Expand Down

0 comments on commit d962648

Please sign in to comment.