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

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/ports/SkFontConfigParser_android.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 0307d362712104f8dd0bd9c2580ee5c0f3183240..98a44543766648277b996203179c103502265558 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -143,13 +143,13 @@ static bool InitFreetype() {
#elif defined(SK_CAN_USE_DLOPEN) && SK_CAN_USE_DLOPEN == 1
//The FreeType library is already loaded, so symbols are available in process.
void* self = dlopen(NULL, RTLD_LAZY);
- if (NULL != self) {
+ if (self) {
FT_Library_SetLcdFilterWeightsProc setLcdFilterWeights;
//The following cast is non-standard, but safe for POSIX.
*reinterpret_cast<void**>(&setLcdFilterWeights) = dlsym(self, "FT_Library_SetLcdFilterWeights");
dlclose(self);
- if (NULL != setLcdFilterWeights) {
+ if (setLcdFilterWeights) {
err = setLcdFilterWeights(gFTLibrary, gGaussianLikeHeavyWeights);
}
}
@@ -316,7 +316,7 @@ static SkFaceRec* ref_ft_face(const SkTypeface* typeface) {
memset(&args, 0, sizeof(args));
const void* memoryBase = strm->getMemoryBase();
- if (NULL != memoryBase) {
+ if (memoryBase) {
//printf("mmap(%s)\n", keyString.c_str());
args.flags = FT_OPEN_MEMORY;
args.memory_base = (const FT_Byte*)memoryBase;
@@ -1654,7 +1654,7 @@ size_t SkTypeface_FreeType::onGetTableData(SkFontTableTag tag, size_t offset,
return 0;
}
FT_ULong size = SkTMin((FT_ULong)length, tableLength - (FT_ULong)offset);
- if (NULL != data) {
+ if (data) {
error = FT_Load_Sfnt_Table(face, tag, offset, reinterpret_cast<FT_Byte*>(data), &size);
if (error) {
return 0;
@@ -1681,7 +1681,7 @@ size_t SkTypeface_FreeType::onGetTableData(SkFontTableTag tag, size_t offset,
const void* memoryBase = stream->getMemoryBase();
FT_StreamRec streamRec;
- if (NULL != memoryBase) {
+ if (memoryBase) {
args.flags = FT_OPEN_MEMORY;
args.memory_base = (const FT_Byte*)memoryBase;
args.memory_size = stream->getLength();
« no previous file with comments | « src/ports/SkFontConfigParser_android.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698