Index: samplecode/SampleFuzz.cpp |
=================================================================== |
--- samplecode/SampleFuzz.cpp (revision 11108) |
+++ samplecode/SampleFuzz.cpp (working copy) |
@@ -59,21 +59,35 @@ |
float v = 0; |
int sel; |
- if (return_large == true && R(3) == 1) sel = R(6); else sel = R(4); |
- if (return_undef == false && sel == 0) sel = 1; |
+ if (return_large == true && R(3) == 1) { |
+ sel = R(6); |
+ } else { |
+ sel = R(4); |
+ } |
- if (R(2) == 1) v = (float)R(100); else |
+ if (return_undef == false && sel == 0) { |
+ sel = 1; |
+ } |
- switch (sel) { |
- case 0: break; |
- case 1: v = 0; break; |
- case 2: v = 0.000001f; break; |
- case 3: v = 10000; break; |
- case 4: v = 2000000000; break; |
- case 5: v = huge(); break; |
+ if (R(2) == 1) { |
+ v = (float)R(100); |
+ } else { |
+ |
+ switch (sel) { |
+ case 0: break; |
+ case 1: v = 0; break; |
+ case 2: v = 0.000001f; break; |
+ case 3: v = 10000; break; |
+ case 4: v = 2000000000; break; |
+ case 5: v = huge(); break; |
+ } |
+ |
} |
- if (R(4) == 1) v = -v; |
+ if (R(4) == 1) { |
+ v = -v; |
+ } |
+ |
return v; |
} |
@@ -176,7 +190,9 @@ |
case 7: |
if (quick == true) break; |
- SkSafeUnref(paint.setMaskFilter(SkBlurMaskFilter::Create(make_number(), SkBlurMaskFilter::kNormal_BlurStyle))); |
+ SkSafeUnref(paint.setMaskFilter(SkBlurMaskFilter::Create( |
+ SkBlurMaskFilter::kNormal_BlurStyle, |
+ make_number()))); |
break; |
case 8: |