From ff46aaf499edcf153ee2f57c7016587aa96dcfa0 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 27 Jul 2015 11:55:29 -0700 Subject: FX Bool considered harmful, part 3 Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 . --- core/src/fpdfapi/fpdf_font/ttgsubtable.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp') diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp index a65359c1d4..980e16c43e 100644 --- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp +++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp @@ -48,15 +48,15 @@ void CFX_GlyphMap::SetAt(int key, int value) } m_Buffer.InsertBlock(low * sizeof(_IntPair), &pair, sizeof(_IntPair)); } -FX_BOOL CFX_GlyphMap::Lookup(int key, int &value) +bool CFX_GlyphMap::Lookup(int key, int &value) { void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_IntPair), sizeof(_IntPair), _CompareInt); if (pResult == NULL) { - return FALSE; + return false; } value = ((FX_DWORD*)pResult)[1]; - return TRUE; + return true; } bool CFX_CTTGSUBTable::LoadGSUBTable(FT_Bytes gsub) { @@ -108,7 +108,7 @@ bool CFX_CTTGSUBTable::GetVerticalGlyph(TT_uint32_t glyphnum, TT_uint32_t *vglyp } } } - m_bFeautureMapLoad = TRUE; + m_bFeautureMapLoad = true; } FX_POSITION pos = m_featureMap.GetStartPosition(); while (pos) { @@ -420,7 +420,7 @@ void CFX_CTTGSUBTable::ParseSingleSubstFormat2(FT_Bytes raw, TSingleSubstFormat2 rec->Substitute[i] = GetUInt16(sp); } } -FX_BOOL CFX_GSUBTable::GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) +bool CFX_GSUBTable::GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) { return m_GsubImp.GetVerticalGlyph(glyphnum, vglyphnum); } -- cgit v1.2.3