Fix minor cppcheck-found issues

https://codereview.chromium.org/13146005/



git-svn-id: http://skia.googlecode.com/svn/trunk@8440 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-03-29 12:11:10 +00:00
parent 6acd09e2b0
commit 87379e17c5
4 changed files with 5 additions and 4 deletions

View File

@ -160,7 +160,6 @@ int num_quad_subdivs(const SkPoint p[3]) {
return -1; return -1;
} }
static const int kMaxSub = 4;
// tolerance of triangle height in pixels // tolerance of triangle height in pixels
// tuned on windows Quadro FX 380 / Z600 // tuned on windows Quadro FX 380 / Z600
// trade off of fill vs cpu time on verts // trade off of fill vs cpu time on verts
@ -170,6 +169,7 @@ int num_quad_subdivs(const SkPoint p[3]) {
if (dsqd <= SkScalarMul(gSubdivTol, gSubdivTol)) { if (dsqd <= SkScalarMul(gSubdivTol, gSubdivTol)) {
return 0; return 0;
} else { } else {
static const int kMaxSub = 4;
// subdividing the quad reduces d by 4. so we want x = log4(d/tol) // subdividing the quad reduces d by 4. so we want x = log4(d/tol)
// = log4(d*d/tol*tol)/2 // = log4(d*d/tol*tol)/2
// = log2(d*d/tol*tol) // = log2(d*d/tol*tol)

View File

@ -357,7 +357,8 @@ private:
} }
}; };
Offscreen::Offscreen() : fRGBSpace(NULL), fCG(NULL) { Offscreen::Offscreen() : fRGBSpace(NULL), fCG(NULL),
fDoAA(false), fDoLCD(false) {
fSize.set(0, 0); fSize.set(0, 0);
} }

View File

@ -23,7 +23,7 @@ SkBitSet::SkBitSet(const SkBitSet& source)
*this = source; *this = source;
} }
const SkBitSet& SkBitSet::operator=(const SkBitSet& rhs) { SkBitSet& SkBitSet::operator=(const SkBitSet& rhs) {
if (this == &rhs) { if (this == &rhs) {
return *this; return *this;
} }

View File

@ -20,7 +20,7 @@ public:
explicit SkBitSet(int numberOfBits); explicit SkBitSet(int numberOfBits);
explicit SkBitSet(const SkBitSet& source); explicit SkBitSet(const SkBitSet& source);
const SkBitSet& operator=(const SkBitSet& rhs); SkBitSet& operator=(const SkBitSet& rhs);
bool operator==(const SkBitSet& rhs); bool operator==(const SkBitSet& rhs);
bool operator!=(const SkBitSet& rhs); bool operator!=(const SkBitSet& rhs);