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

Side by Side Diff: core/fxcodec/jbig2/JBig2_Context.cpp

Issue 1885093002: Re-enable warning 4701 for GN build and some cleanup (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | xfa/fgas/localization/fgas_datetime.h » ('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 "core/fxcodec/jbig2/JBig2_Context.h" 7 #include "core/fxcodec/jbig2/JBig2_Context.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 int32_t runcodes[kRunCodesSize]; 1278 int32_t runcodes[kRunCodesSize];
1279 int32_t runcodes_len[kRunCodesSize]; 1279 int32_t runcodes_len[kRunCodesSize];
1280 for (size_t i = 0; i < kRunCodesSize; ++i) { 1280 for (size_t i = 0; i < kRunCodesSize; ++i) {
1281 if (pStream->readNBits(4, &runcodes_len[i]) != 0) 1281 if (pStream->readNBits(4, &runcodes_len[i]) != 0)
1282 return nullptr; 1282 return nullptr;
1283 } 1283 }
1284 huffman_assign_code(runcodes, runcodes_len, kRunCodesSize); 1284 huffman_assign_code(runcodes, runcodes_len, kRunCodesSize);
1285 1285
1286 std::unique_ptr<JBig2HuffmanCode, FxFreeDeleter> SBSYMCODES( 1286 std::unique_ptr<JBig2HuffmanCode, FxFreeDeleter> SBSYMCODES(
1287 FX_Alloc(JBig2HuffmanCode, SBNUMSYMS)); 1287 FX_Alloc(JBig2HuffmanCode, SBNUMSYMS));
1288 int32_t run; 1288 int32_t run = 0;
1289 int32_t i = 0; 1289 int32_t i = 0;
1290 while (i < (int)SBNUMSYMS) { 1290 while (i < (int)SBNUMSYMS) {
1291 size_t j; 1291 size_t j;
1292 int32_t nVal = 0; 1292 int32_t nVal = 0;
1293 int32_t nBits = 0; 1293 int32_t nBits = 0;
1294 uint32_t nTemp; 1294 uint32_t nTemp;
1295 while (true) { 1295 while (true) {
1296 if (pStream->read1Bit(&nTemp) != 0) 1296 if (pStream->read1Bit(&nTemp) != 0)
1297 return nullptr; 1297 return nullptr;
1298 1298
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 SBSYMCODES[CURTEMP].code = CURCODE; 1406 SBSYMCODES[CURTEMP].code = CURCODE;
1407 CURCODE = CURCODE + 1; 1407 CURCODE = CURCODE + 1;
1408 } 1408 }
1409 CURTEMP = CURTEMP + 1; 1409 CURTEMP = CURTEMP + 1;
1410 } 1410 }
1411 CURLEN = CURLEN + 1; 1411 CURLEN = CURLEN + 1;
1412 } 1412 }
1413 FX_Free(LENCOUNT); 1413 FX_Free(LENCOUNT);
1414 FX_Free(FIRSTCODE); 1414 FX_Free(FIRSTCODE);
1415 } 1415 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_pattern.cpp ('k') | xfa/fgas/localization/fgas_datetime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698