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

Unified Diff: src/core/SkLazyFnPtr.h

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 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 | « src/core/SkLayerInfo.h ('k') | src/core/SkLightingShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLazyFnPtr.h
diff --git a/src/core/SkLazyFnPtr.h b/src/core/SkLazyFnPtr.h
index 9e9bc1165c946653c96789c6f92cc057c3bf45c2..153578201ae83bba39f6d24e7af5c57072afbc54 100644
--- a/src/core/SkLazyFnPtr.h
+++ b/src/core/SkLazyFnPtr.h
@@ -42,7 +42,7 @@ public:
F get() {
// First, try reading to see if it's already set.
F fn = (F)sk_atomic_load(&fPtr, sk_memory_order_relaxed);
- if (fn != NULL) {
+ if (fn != nullptr) {
return fn;
}
@@ -50,11 +50,11 @@ public:
fn = Choose();
// No particular memory barriers needed; we're not guarding anything but the pointer itself.
- F prev = (F)sk_atomic_cas(&fPtr, NULL, (void*)fn);
+ F prev = (F)sk_atomic_cas(&fPtr, nullptr, (void*)fn);
- // If prev != NULL, someone snuck in and set fPtr concurrently.
- // If prev == NULL, we did write fn to fPtr.
- return prev != NULL ? prev : fn;
+ // If prev != nullptr, someone snuck in and set fPtr concurrently.
+ // If prev == nullptr, we did write fn to fPtr.
+ return prev != nullptr ? prev : fn;
}
private:
« no previous file with comments | « src/core/SkLayerInfo.h ('k') | src/core/SkLightingShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698