summaryrefslogtreecommitdiff
path: root/libs/hwui/Interpolator.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-12-22 17:16:56 -0800
committerChris Craik <ccraik@google.com>2014-12-23 16:53:56 -0800
commit51d6a3db97bdd5315f1a17a4b447d10a92217b98 (patch)
tree80803f8d2a5507e2d29bd58c7243a23fca343454 /libs/hwui/Interpolator.cpp
parente84a208317e0ed388fcdad1e6743c7849acb51b0 (diff)
Cleanup various clang warnings, use unique_ptrs in several places
Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
Diffstat (limited to 'libs/hwui/Interpolator.cpp')
-rw-r--r--libs/hwui/Interpolator.cpp10
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];