Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: src/core/SkBitmap.cpp

Issue 338933002: Cleaned a repeated if(condition) with the same condition (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index dcbba9afb080976c77162628bdd7d7bfc8f5a84f..0490e8f4827aafefc5da8680936fa4599a233093 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -295,13 +295,11 @@ SkPixelRef* SkBitmap::setPixelRef(SkPixelRef* pr, int dx, int dy) {
}
if (fPixelRef != pr) {
- if (fPixelRef != pr) {
- this->freePixels();
- SkASSERT(NULL == fPixelRef);
+ this->freePixels();
+ SkASSERT(NULL == fPixelRef);
- SkSafeRef(pr);
- fPixelRef = pr;
- }
+ SkSafeRef(pr);
+ fPixelRef = pr;
this->updatePixelsFromRef();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698