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

Side by Side Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.cpp

Issue 1547833002: Switch from nonstd::unique_ptr to std::unique_ptr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "ttgsubtable.h" 7 #include "ttgsubtable.h"
8 8
9 #include <memory>
10
9 #include "core/include/fxge/fx_freetype.h" 11 #include "core/include/fxge/fx_freetype.h"
10 #include "core/include/fxge/fx_ge.h" 12 #include "core/include/fxge/fx_ge.h"
11 #include "third_party/base/nonstd_unique_ptr.h"
12 #include "third_party/base/stl_util.h" 13 #include "third_party/base/stl_util.h"
13 14
14 CFX_GlyphMap::CFX_GlyphMap() {} 15 CFX_GlyphMap::CFX_GlyphMap() {}
15 CFX_GlyphMap::~CFX_GlyphMap() {} 16 CFX_GlyphMap::~CFX_GlyphMap() {}
16 extern "C" { 17 extern "C" {
17 static int _CompareInt(const void* p1, const void* p2) { 18 static int _CompareInt(const void* p1, const void* p2) {
18 return (*(FX_DWORD*)p1) - (*(FX_DWORD*)p2); 19 return (*(FX_DWORD*)p1) - (*(FX_DWORD*)p2);
19 } 20 }
20 }; 21 };
21 struct _IntPair { 22 struct _IntPair {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 pFont->SetSubData(FX_Alloc(uint8_t, length)); 399 pFont->SetSubData(FX_Alloc(uint8_t, length));
399 } 400 }
400 if (!pFont->GetSubData()) { 401 if (!pFont->GetSubData()) {
401 return NULL; 402 return NULL;
402 } 403 }
403 } 404 }
404 int error = 405 int error =
405 FXFT_Load_Sfnt_Table(pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0, 406 FXFT_Load_Sfnt_Table(pFont->GetFace(), FT_MAKE_TAG('G', 'S', 'U', 'B'), 0,
406 pFont->GetSubData(), NULL); 407 pFont->GetSubData(), NULL);
407 if (!error && pFont->GetSubData()) { 408 if (!error && pFont->GetSubData()) {
408 nonstd::unique_ptr<CFX_GSUBTable> pGsubTable(new CFX_GSUBTable); 409 std::unique_ptr<CFX_GSUBTable> pGsubTable(new CFX_GSUBTable);
409 if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->GetSubData())) { 410 if (pGsubTable->m_GsubImp.LoadGSUBTable((FT_Bytes)pFont->GetSubData())) {
410 return pGsubTable.release(); 411 return pGsubTable.release();
411 } 412 }
412 } 413 }
413 return NULL; 414 return NULL;
414 } 415 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698