From 6b8cb256e62b22f921b7e41eb44b07ab7cc0bd56 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Mon, 1 Jun 2009 23:52:37 +0000 Subject: 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 --- src/core/SkBitmap.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/SkBitmap.cpp') 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 { -- cgit v1.2.3