aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-29 12:11:10 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-29 12:11:10 +0000
commit87379e17c5e95c6fe0d88b3b9ae134355cfafc66 (patch)
tree8814bfed3ccb9726f88cdf0760ba81d3a88b1cb5 /src
parent6acd09e2b07ef547dbc0c3a69425a4dcda0cca51 (diff)
Fix minor cppcheck-found issues
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrAAHairLinePathRenderer.cpp2
-rwxr-xr-xsrc/ports/SkFontHost_mac.cpp3
-rwxr-xr-xsrc/utils/SkBitSet.cpp2
-rwxr-xr-xsrc/utils/SkBitSet.h2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index 9e24bed338..0c64a3b3b7 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -160,7 +160,6 @@ int num_quad_subdivs(const SkPoint p[3]) {
return -1;
}
- static const int kMaxSub = 4;
// tolerance of triangle height in pixels
// tuned on windows Quadro FX 380 / Z600
// 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)) {
return 0;
} else {
+ static const int kMaxSub = 4;
// subdividing the quad reduces d by 4. so we want x = log4(d/tol)
// = log4(d*d/tol*tol)/2
// = log2(d*d/tol*tol)
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 6ae2ea4e41..79e4bde01e 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -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);
}
diff --git a/src/utils/SkBitSet.cpp b/src/utils/SkBitSet.cpp
index 664c8cd86f..36ff6cbb01 100755
--- a/src/utils/SkBitSet.cpp
+++ b/src/utils/SkBitSet.cpp
@@ -23,7 +23,7 @@ SkBitSet::SkBitSet(const SkBitSet& source)
*this = source;
}
-const SkBitSet& SkBitSet::operator=(const SkBitSet& rhs) {
+SkBitSet& SkBitSet::operator=(const SkBitSet& rhs) {
if (this == &rhs) {
return *this;
}
diff --git a/src/utils/SkBitSet.h b/src/utils/SkBitSet.h
index 484fc2aec2..e113fd7004 100755
--- a/src/utils/SkBitSet.h
+++ b/src/utils/SkBitSet.h
@@ -20,7 +20,7 @@ public:
explicit SkBitSet(int numberOfBits);
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);