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 <stddef.h> // For offsetof(). | 7 #include <stddef.h> // For offsetof(). |
8 | 8 |
9 #include "../../include/fxcrt/fx_basic.h" | 9 #include "core/include/fxcrt/fx_basic.h" |
10 #include "third_party/base/numerics/safe_math.h" | 10 #include "third_party/base/numerics/safe_math.h" |
11 | 11 |
12 // static | 12 // static |
13 CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen) { | 13 CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen) { |
14 // TODO(palmer): |nLen| should really be declared as |size_t|, or | 14 // TODO(palmer): |nLen| should really be declared as |size_t|, or |
15 // at least unsigned. | 15 // at least unsigned. |
16 if (nLen == 0 || nLen < 0) { | 16 if (nLen == 0 || nLen < 0) { |
17 return NULL; | 17 return NULL; |
18 } | 18 } |
19 | 19 |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 return (CFX_CharMap*)&g_DefaultJISMapper; | 1057 return (CFX_CharMap*)&g_DefaultJISMapper; |
1058 case 936: | 1058 case 936: |
1059 return (CFX_CharMap*)&g_DefaultGBKMapper; | 1059 return (CFX_CharMap*)&g_DefaultGBKMapper; |
1060 case 949: | 1060 case 949: |
1061 return (CFX_CharMap*)&g_DefaultUHCMapper; | 1061 return (CFX_CharMap*)&g_DefaultUHCMapper; |
1062 case 950: | 1062 case 950: |
1063 return (CFX_CharMap*)&g_DefaultBig5Mapper; | 1063 return (CFX_CharMap*)&g_DefaultBig5Mapper; |
1064 } | 1064 } |
1065 return NULL; | 1065 return NULL; |
1066 } | 1066 } |
OLD | NEW |