OLD | NEW |
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 <limits> | 7 #include <limits> |
8 | 8 |
9 #include "../../include/fxcrt/fx_ext.h" | 9 #include "core/include/fxcrt/fx_ext.h" |
10 #include "../../include/fxcrt/fx_string.h" | 10 #include "core/include/fxcrt/fx_string.h" |
11 | 11 |
12 template <class T, class STR_T> | 12 template <class T, class STR_T> |
13 T FXSYS_StrToInt(STR_T str) { | 13 T FXSYS_StrToInt(STR_T str) { |
14 FX_BOOL neg = FALSE; | 14 FX_BOOL neg = FALSE; |
15 if (str == NULL) { | 15 if (str == NULL) { |
16 return 0; | 16 return 0; |
17 } | 17 } |
18 if (*str == '-') { | 18 if (*str == '-') { |
19 neg = TRUE; | 19 neg = TRUE; |
20 str++; | 20 str++; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 buf[wlen] = bstr[i]; | 231 buf[wlen] = bstr[i]; |
232 } | 232 } |
233 wlen++; | 233 wlen++; |
234 } | 234 } |
235 return wlen; | 235 return wlen; |
236 } | 236 } |
237 #ifdef __cplusplus | 237 #ifdef __cplusplus |
238 } | 238 } |
239 #endif | 239 #endif |
240 #endif | 240 #endif |
OLD | NEW |