Fix ALL compile warnings
All warnings/errors fixed for GCC & Clang
Change-Id: I2ece3a136a5ae97a9acc3069537ed986238b5fd3
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index 8a5e722..8c3077b 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -218,7 +218,7 @@
// Since neither polygon fully contain the other one, we need to add all the
// intersection points.
- Vector2 intersection;
+ Vector2 intersection = {0, 0};
for (int i = 0; i < poly2Length; i++) {
for (int j = 0; j < poly1Length; j++) {
int poly2LineStart = i;
@@ -250,7 +250,7 @@
}
// Sort the result polygon around the center.
- Vector2 center(0.0f, 0.0f);
+ Vector2 center = {0.0f, 0.0f};
for (int i = 0; i < count; i++) {
center += poly[i];
}
@@ -557,7 +557,7 @@
float x = lightPoly[j].x - ratioZ * (lightPoly[j].x - poly[i].x);
float y = lightPoly[j].y - ratioZ * (lightPoly[j].y - poly[i].y);
- Vector2 newPoint = Vector2(x, y);
+ Vector2 newPoint = {x, y};
shadowRegion[k] = newPoint;
outline[m] = newPoint;