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

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

Issue 1243883003: Fix else-after-returns throughout pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, Address comments. Created 5 years, 5 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
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 "../../../include/fpdfapi/fpdf_module.h" 7 #include "../../../include/fpdfapi/fpdf_module.h"
8 #include "../../../include/fpdfapi/fpdf_page.h" 8 #include "../../../include/fpdfapi/fpdf_page.h"
9 #include "../../../include/fpdfapi/fpdf_pageobj.h" 9 #include "../../../include/fpdfapi/fpdf_pageobj.h"
10 #include "../../../include/fpdfapi/fpdf_resource.h" 10 #include "../../../include/fpdfapi/fpdf_resource.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } else if (buf[i] >= 'a' && buf[i] <= 'f') { 548 } else if (buf[i] >= 'a' && buf[i] <= 'f') {
549 digit = buf[i] - 'a' + 10; 549 digit = buf[i] - 'a' + 10;
550 } else if (buf[i] >= 'A' && buf[i] <= 'F') { 550 } else if (buf[i] >= 'A' && buf[i] <= 'F') {
551 digit = buf[i] - 'A' + 10; 551 digit = buf[i] - 'A' + 10;
552 } else { 552 } else {
553 break; 553 break;
554 } 554 }
555 result = result * 16 + digit; 555 result = result * 16 + digit;
556 } 556 }
557 return result; 557 return result;
558 } else { 558 }
559 for (int i = 0; i < len; i ++) { 559 for (int i = 0; i < len; i ++) {
560 if (buf[i] < '0' || buf[i] > '9') { 560 if (buf[i] < '0' || buf[i] > '9') {
561 break; 561 break;
562 }
563 result = result * 10 + buf[i] - '0';
564 } 562 }
563 result = result * 10 + buf[i] - '0';
565 } 564 }
566 return result; 565 return result;
567 } 566 }
568 static CFX_WideString _StringDataAdd(CFX_WideString str) 567 static CFX_WideString _StringDataAdd(CFX_WideString str)
569 { 568 {
570 CFX_WideString ret; 569 CFX_WideString ret;
571 int len = str.GetLength(); 570 int len = str.GetLength();
572 FX_WCHAR value = 1; 571 FX_WCHAR value = 1;
573 for (int i = len - 1; i >= 0 ; --i) { 572 for (int i = len - 1; i >= 0 ; --i) {
574 FX_WCHAR ch = str[i] + value; 573 FX_WCHAR ch = str[i] + value;
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 m_pForm = NULL; 1737 m_pForm = NULL;
1739 m_pBitmap = NULL; 1738 m_pBitmap = NULL;
1740 m_bPageRequired = FALSE; 1739 m_bPageRequired = FALSE;
1741 m_bColored = FALSE; 1740 m_bColored = FALSE;
1742 } 1741 }
1743 CPDF_Type3Char::~CPDF_Type3Char() 1742 CPDF_Type3Char::~CPDF_Type3Char()
1744 { 1743 {
1745 delete m_pForm; 1744 delete m_pForm;
1746 delete m_pBitmap; 1745 delete m_pBitmap;
1747 } 1746 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698