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

Unified Diff: core/src/fxge/ge/fx_ge_font.cpp

Issue 1520063002: Get rid of most instance of 'foo == NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@bstr_isnull
Patch Set: Created 5 years 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
Index: core/src/fxge/ge/fx_ge_font.cpp
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index f3c63a0e8ea209216f1113d7b9dc675cd8cc1c72..2bed2bdaa77a159ff46e73500750aaa7b7cc5ec0 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -226,7 +226,7 @@ FX_BOOL CFX_Font::IsFixedWidth() const {
}
CFX_WideString CFX_Font::GetPsName() const {
- if (m_Face == NULL) {
+ if (!m_Face) {
return CFX_WideString();
}
CFX_WideString psName =
@@ -237,7 +237,7 @@ CFX_WideString CFX_Font::GetPsName() const {
return psName;
}
CFX_ByteString CFX_Font::GetFamilyName() const {
- if (m_Face == NULL && m_pSubstFont == NULL) {
+ if (!m_Face && !m_pSubstFont) {
return CFX_ByteString();
}
if (m_Face) {
@@ -246,7 +246,7 @@ CFX_ByteString CFX_Font::GetFamilyName() const {
return m_pSubstFont->m_Family;
}
CFX_ByteString CFX_Font::GetFaceName() const {
- if (m_Face == NULL && m_pSubstFont == NULL) {
+ if (!m_Face && !m_pSubstFont) {
return CFX_ByteString();
}
if (m_Face) {
@@ -264,7 +264,7 @@ CFX_ByteString CFX_Font::GetFaceName() const {
return m_pSubstFont->m_Family;
}
FX_BOOL CFX_Font::GetBBox(FX_RECT& bbox) {
- if (m_Face == NULL) {
+ if (!m_Face) {
return FALSE;
}
int em = FXFT_Get_Face_UnitsPerEM(m_Face);

Powered by Google App Engine
This is Rietveld 408576698