diff options
Diffstat (limited to 'libs/hwui/Interpolator.cpp')
-rw-r--r-- | libs/hwui/Interpolator.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/hwui/Interpolator.cpp b/libs/hwui/Interpolator.cpp index 2623f5387f91..e1b0fc3937c5 100644 --- a/libs/hwui/Interpolator.cpp +++ b/libs/hwui/Interpolator.cpp @@ -88,14 +88,12 @@ float OvershootInterpolator::interpolate(float t) { return t * t * ((mTension + 1) * t + mTension) + 1.0f; } -LUTInterpolator::LUTInterpolator(float* values, size_t size) { - mValues = values; - mSize = size; +LUTInterpolator::LUTInterpolator(float* values, size_t size) + : mValues(values) + , mSize(size) { } LUTInterpolator::~LUTInterpolator() { - delete mValues; - mValues = 0; } float LUTInterpolator::interpolate(float input) { @@ -112,7 +110,7 @@ float LUTInterpolator::interpolate(float input) { LOG_ALWAYS_FATAL_IF(i1 < 0 || i2 < 0, "negatives in interpolation!" " i1=%d, i2=%d, input=%f, lutpos=%f, size=%zu, values=%p, ipart=%f, weight=%f", - i1, i2, input, lutpos, mSize, mValues, ipart, weight); + i1, i2, input, lutpos, mSize, mValues.get(), ipart, weight); float v1 = mValues[i1]; float v2 = mValues[i2]; |