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

Unified Diff: src/fonts/SkFontMgr_indirect.cpp

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/fonts/SkFontMgr_fontconfig.cpp ('k') | src/fonts/SkTestScalerContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkFontMgr_indirect.cpp
diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp
index 33c79c86c7c9c3439bdd2d6a85e318774e3c8567..132130f0d869c29a897dd578a0a72e6c95792de1 100644
--- a/src/fonts/SkFontMgr_indirect.cpp
+++ b/src/fonts/SkFontMgr_indirect.cpp
@@ -175,8 +175,8 @@ void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const
SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
SkRemotableFontIdentitySet* set = fProxy->getIndex(index);
- if (NULL == set) {
- return NULL;
+ if (nullptr == set) {
+ return nullptr;
}
return new SkStyleSet_Indirect(this, index, set);
}
@@ -187,7 +187,7 @@ SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const
SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const {
if (id.fDataId == SkFontIdentity::kInvalidDataId) {
- return NULL;
+ return nullptr;
}
SkAutoMutexAcquire ama(fDataCacheMutex);
@@ -202,7 +202,7 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i
{
return entry.fTypeface;
}
- if (dataTypeface.get() == NULL &&
+ if (dataTypeface.get() == nullptr &&
!entry.fTypeface->weak_expired() && entry.fTypeface->try_ref())
{
dataTypeface.reset(entry.fTypeface);
@@ -217,22 +217,22 @@ SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& i
}
// No exact match, but did find a data match.
- if (dataTypeface.get() != NULL) {
- SkAutoTDelete<SkStreamAsset> stream(dataTypeface->openStream(NULL));
- if (stream.get() != NULL) {
+ if (dataTypeface.get() != nullptr) {
+ SkAutoTDelete<SkStreamAsset> stream(dataTypeface->openStream(nullptr));
+ if (stream.get() != nullptr) {
return fImpl->createFromStream(stream.detach(), dataTypefaceIndex);
}
}
// No data match, request data and add entry.
SkAutoTDelete<SkStreamAsset> stream(fProxy->getData(id.fDataId));
- if (stream.get() == NULL) {
- return NULL;
+ if (stream.get() == nullptr) {
+ return nullptr;
}
SkAutoTUnref<SkTypeface> typeface(fImpl->createFromStream(stream.detach(), id.fTtcIndex));
- if (typeface.get() == NULL) {
- return NULL;
+ if (typeface.get() == nullptr) {
+ return nullptr;
}
DataEntry& newEntry = fDataCache.push_back();
@@ -291,11 +291,11 @@ SkTypeface* SkFontMgr_Indirect::onLegacyCreateTypeface(const char familyName[],
SkAutoTUnref<SkTypeface> face(this->matchFamilyStyle(familyName, style));
- if (NULL == face.get()) {
- face.reset(this->matchFamilyStyle(NULL, style));
+ if (nullptr == face.get()) {
+ face.reset(this->matchFamilyStyle(nullptr, style));
}
- if (NULL == face.get()) {
+ if (nullptr == face.get()) {
SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style);
face.reset(this->createTypefaceFromFontId(fontId));
}
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/fonts/SkTestScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698