aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-29 14:23:56 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-29 14:23:56 +0000
commitfc2f0d0e6e6f72503ff9504296556dc637059c15 (patch)
treec06ee4984835cf5dd479b9ff993e35e578962633 /src
parent87379e17c5e95c6fe0d88b3b9ae134355cfafc66 (diff)
use SkTCast
git-svn-id: http://skia.googlecode.com/svn/trunk@8443 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkDraw.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 3b44895dd0..3c3e3a34fd 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -782,14 +782,6 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
}
}
-static inline SkPoint* as_lefttop(SkRect* r) {
- return (SkPoint*)(void*)r;
-}
-
-static inline SkPoint* as_rightbottom(SkRect* r) {
- return ((SkPoint*)(void*)r) + 1;
-}
-
static bool easy_rect_join(const SkPaint& paint, const SkMatrix& matrix,
SkPoint* strokeSize) {
if (SkPaint::kMiter_Join != paint.getStrokeJoin() ||
@@ -834,11 +826,11 @@ SkDraw::RectType SkDraw::ComputeRectType(const SkPaint& paint,
}
static const SkPoint* rect_points(const SkRect& r) {
- return (const SkPoint*)(void*)&r;
+ return SkTCast<const SkPoint*>(&r);
}
static SkPoint* rect_points(SkRect& r) {
- return (SkPoint*)(void*)&r;
+ return SkTCast<SkPoint*>(&r);
}
void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {