change getLastPt to return a bool
git-svn-id: http://skia.googlecode.com/svn/trunk@2453 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 5e10f1b..10569fd 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -327,17 +327,20 @@
return SkPoint::Make(0, 0);
}
-void SkPath::getLastPt(SkPoint* lastPt) const {
+bool SkPath::getLastPt(SkPoint* lastPt) const {
SkDEBUGCODE(this->validate();)
- if (lastPt) {
- int count = fPts.count();
- if (count == 0) {
- lastPt->set(0, 0);
- } else {
+ int count = fPts.count();
+ if (count > 0) {
+ if (lastPt) {
*lastPt = fPts[count - 1];
}
+ return true;
}
+ if (lastPt) {
+ lastPt->set(0, 0);
+ }
+ return false;
}
void SkPath::setLastPt(SkScalar x, SkScalar y) {