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

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

Issue 1773733002: Review and cleanup lint warnings. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 <stddef.h> // For offsetof(). 7 #include <stddef.h>
8
8 #include <cctype> 9 #include <cctype>
10 #include <string>
Tom Sepez 2016/03/08 19:27:05 There aren't any std::strings in the core PDFium c
dsinclair 2016/03/08 21:08:02 Done.
9 11
10 #include "core/include/fxcrt/fx_basic.h" 12 #include "core/include/fxcrt/fx_basic.h"
11 #include "third_party/base/numerics/safe_math.h" 13 #include "third_party/base/numerics/safe_math.h"
12 14
13 static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) { 15 static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) {
14 if (i == 0) { 16 if (i == 0) {
15 buf[0] = '0'; 17 buf[0] = '0';
16 return 1; 18 return 1;
17 } 19 }
18 char buf1[32]; 20 char buf1[32];
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 fraction %= scale; 1081 fraction %= scale;
1080 scale /= 10; 1082 scale /= 10;
1081 } 1083 }
1082 return buf_size; 1084 return buf_size;
1083 } 1085 }
1084 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) { 1086 CFX_ByteString CFX_ByteString::FormatFloat(FX_FLOAT d, int precision) {
1085 FX_CHAR buf[32]; 1087 FX_CHAR buf[32];
1086 FX_STRSIZE len = FX_ftoa(d, buf); 1088 FX_STRSIZE len = FX_ftoa(d, buf);
1087 return CFX_ByteString(buf, len); 1089 return CFX_ByteString(buf, len);
1088 } 1090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698