Fix a bunch of Coverity defects - class members not initialized in the constructor.
CID=14533,14036,9275,9271,4156,4153,4151,1666,1665,1618,1617,1616,1615
Review URL: https://codereview.appspot.com/5940049
git-svn-id: http://skia.googlecode.com/svn/trunk@3532 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp
index 9ccc453..11170f4 100644
--- a/src/effects/Sk1DPathEffect.cpp
+++ b/src/effects/Sk1DPathEffect.cpp
@@ -34,6 +34,8 @@
if (advance <= 0 || path.isEmpty()) {
SkDEBUGF(("SkPath1DPathEffect can't use advance <= 0\n"));
fAdvance = 0; // signals we can't draw anything
+ fInitialOffset = 0;
+ fStyle = kStyleCount;
} else {
// cleanup their phase parameter, inverting it so that it becomes an
// offset along the path (to match the interpretation in PostScript)
@@ -142,6 +144,11 @@
fPath.unflatten(buffer);
fInitialOffset = buffer.readScalar();
fStyle = (Style) buffer.readU8();
+ } else {
+ SkDEBUGF(("SkPath1DPathEffect can't use advance <= 0\n"));
+ // Make Coverity happy.
+ fInitialOffset = 0;
+ fStyle = kStyleCount;
}
}