| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 #ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ | 5 #ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ |
| 6 #define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ | 6 #define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ |
| 7 | 7 |
| 8 #if !defined(CLD_WINDOWS) | 8 #if !defined(CLD_WINDOWS) |
| 9 | 9 |
| 10 //#include "cld/base/strtoint.h" | 10 //#include "cld/base/strtoint.h" |
| 11 | 11 |
| 12 #else | 12 #else |
| 13 | 13 |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 | 15 |
| 16 #include "encodings/compact_lang_det/win/cld_basictypes.h" | 16 #include "encodings/compact_lang_det/win/cld_basictypes.h" |
| 17 | 17 |
| 18 // This implementation is not as good as the one in base/strtoint.h, | 18 // This implementation is not as good as the one in base/strtoint.h, |
| 19 // but it's sufficient for our purposes. | 19 // but it's sufficient for our purposes. |
| 20 inline int32 strto32(const char *nptr, char **endptr, int base) { | 20 inline int32 strto32(const char *nptr, char **endptr, int base) { |
| 21 return static_cast<int32>(strtol(nptr, endptr, base)); | 21 return static_cast<int32>(strtol(nptr, endptr, base)); |
| 22 } | 22 } |
| 23 | 23 |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 #endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ | 26 #endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_ |
| OLD | NEW |