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

Side by Side Diff: core/fxcodec/lgif/fx_gif.cpp

Issue 1888103002: Replace calls to deprecated CFX_{Wide,Byte}String::Empty() (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/fxcodec/codec/fx_codec_gif.cpp ('k') | core/fxcrt/fx_basic_buffer.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 "core/fxcodec/lgif/fx_gif.h" 7 #include "core/fxcodec/lgif/fx_gif.h"
8 8
9 #include "core/fxcodec/lbmp/fx_bmp.h" 9 #include "core/fxcodec/lbmp/fx_bmp.h"
10 10
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 int32_t gif_decode_extension(gif_decompress_struct_p gif_ptr) { 640 int32_t gif_decode_extension(gif_decompress_struct_p gif_ptr) {
641 uint8_t* data_size_ptr = NULL; 641 uint8_t* data_size_ptr = NULL;
642 uint8_t* data_ptr = NULL; 642 uint8_t* data_ptr = NULL;
643 uint32_t skip_size_org = gif_ptr->skip_size; 643 uint32_t skip_size_org = gif_ptr->skip_size;
644 switch (gif_ptr->decode_status) { 644 switch (gif_ptr->decode_status) {
645 case GIF_D_STATUS_EXT_CE: { 645 case GIF_D_STATUS_EXT_CE: {
646 if (gif_read_data(gif_ptr, &data_size_ptr, 1) == NULL) { 646 if (gif_read_data(gif_ptr, &data_size_ptr, 1) == NULL) {
647 gif_ptr->skip_size = skip_size_org; 647 gif_ptr->skip_size = skip_size_org;
648 return 2; 648 return 2;
649 } 649 }
650 gif_ptr->cmt_data_ptr->Empty(); 650 gif_ptr->cmt_data_ptr->clear();
651 while (*data_size_ptr != GIF_BLOCK_TERMINAL) { 651 while (*data_size_ptr != GIF_BLOCK_TERMINAL) {
652 uint8_t data_size = *data_size_ptr; 652 uint8_t data_size = *data_size_ptr;
653 if (gif_read_data(gif_ptr, &data_ptr, *data_size_ptr) == NULL || 653 if (gif_read_data(gif_ptr, &data_ptr, *data_size_ptr) == NULL ||
654 gif_read_data(gif_ptr, &data_size_ptr, 1) == NULL) { 654 gif_read_data(gif_ptr, &data_size_ptr, 1) == NULL) {
655 gif_ptr->skip_size = skip_size_org; 655 gif_ptr->skip_size = skip_size_org;
656 return 2; 656 return 2;
657 } 657 }
658 *(gif_ptr->cmt_data_ptr) += 658 *(gif_ptr->cmt_data_ptr) +=
659 CFX_ByteString((const FX_CHAR*)data_ptr, data_size); 659 CFX_ByteString((const FX_CHAR*)data_ptr, data_size);
660 } 660 }
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 gif_ptr->cur_offset = cur_offset; 1220 gif_ptr->cur_offset = cur_offset;
1221 res = FALSE; 1221 res = FALSE;
1222 } 1222 }
1223 dst_len = gif_ptr->cur_offset; 1223 dst_len = gif_ptr->cur_offset;
1224 dst_buf[dst_len - 1] = GIF_SIG_TRAILER; 1224 dst_buf[dst_len - 1] = GIF_SIG_TRAILER;
1225 if (res) { 1225 if (res) {
1226 gif_ptr->frames++; 1226 gif_ptr->frames++;
1227 } 1227 }
1228 return res; 1228 return res;
1229 } 1229 }
OLDNEW
« no previous file with comments | « core/fxcodec/codec/fx_codec_gif.cpp ('k') | core/fxcrt/fx_basic_buffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698