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

Side by Side Diff: core/fxcrt/fx_basic_bstring.cpp

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit Created 4 years, 7 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_icc.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cctype> 10 #include <cctype>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 StringData::Create(m_pData->m_String + nCopyIndex, nCopyLen)); 401 StringData::Create(m_pData->m_String + nCopyIndex, nCopyLen));
402 dest.m_pData.Swap(pNewData); 402 dest.m_pData.Swap(pNewData);
403 } 403 }
404 404
405 #define FORCE_ANSI 0x10000 405 #define FORCE_ANSI 0x10000
406 #define FORCE_UNICODE 0x20000 406 #define FORCE_UNICODE 0x20000
407 #define FORCE_INT64 0x40000 407 #define FORCE_INT64 0x40000
408 408
409 CFX_ByteString CFX_ByteString::FormatInteger(int i, uint32_t flags) { 409 CFX_ByteString CFX_ByteString::FormatInteger(int i, uint32_t flags) {
410 char buf[32]; 410 char buf[32];
411 return CFX_ByteStringC(buf, Buffer_itoa(buf, i, flags)); 411 return CFX_ByteString(buf, Buffer_itoa(buf, i, flags));
412 } 412 }
413 413
414 void CFX_ByteString::FormatV(const FX_CHAR* pFormat, va_list argList) { 414 void CFX_ByteString::FormatV(const FX_CHAR* pFormat, va_list argList) {
415 va_list argListSave; 415 va_list argListSave;
416 #if defined(__ARMCC_VERSION) || \ 416 #if defined(__ARMCC_VERSION) || \
417 (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || \ 417 (!defined(_MSC_VER) && (_FX_CPU_ == _FX_X64_ || _FX_CPU_ == _FX_IA64_ || \
418 _FX_CPU_ == _FX_ARM64_)) || \ 418 _FX_CPU_ == _FX_ARM64_)) || \
419 defined(__native_client__) 419 defined(__native_client__)
420 va_copy(argListSave, argList); 420 va_copy(argListSave, argList);
421 #else 421 #else
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 fraction %= scale; 976 fraction %= scale;
977 scale /= 10; 977 scale /= 10;
978 } 978 }
979 return buf_size; 979 return buf_size;
980 } 980 }
981 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) { 981 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) {
982 FX_CHAR buf[32]; 982 FX_CHAR buf[32];
983 FX_STRSIZE len = FX_ftoa(d, buf); 983 FX_STRSIZE len = FX_ftoa(d, buf);
984 return CFX_ByteString(buf, len); 984 return CFX_ByteString(buf, len);
985 } 985 }
OLDNEW
« no previous file with comments | « core/fxcodec/codec/fx_codec_icc.cpp ('k') | core/fxcrt/fx_basic_buffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698