aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
authorGravatar agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-01 23:52:37 +0000
committerGravatar agl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-06-01 23:52:37 +0000
commit6b8cb256e62b22f921b7e41eb44b07ab7cc0bd56 (patch)
tree806b9a7b8e1e0650e8612ca9a61e826dee10f270 /src/core/SkBitmap.cpp
parentdaa200eba260377f81b84ad060f23322f9ad98a8 (diff)
Style only change to make SkBitmap to make it build with VC2005.
TBR=reed git-svn-id: http://skia.googlecode.com/svn/trunk@196 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 0a8e9ffdde..616429cc62 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -235,15 +235,13 @@ void SkBitmap::setConfig(Config c, int width, int height, int rowBytes) {
this->freePixels();
if ((width | height | rowBytes) < 0) {
- ERROR:
- this->reset();
- return;
+ goto err;
}
if (rowBytes == 0) {
rowBytes = SkBitmap::ComputeRowBytes(c, width);
if (0 == rowBytes && kNo_Config != c) {
- goto ERROR;
+ goto err;
}
}
@@ -255,6 +253,9 @@ void SkBitmap::setConfig(Config c, int width, int height, int rowBytes) {
fBytesPerPixel = (uint8_t)ComputeBytesPerPixel(c);
SkDEBUGCODE(this->validate();)
+
+err:
+ this->reset();
}
void SkBitmap::updatePixelsFromRef() const {