Roll src/third_party/WebKit 06cb9e9:a978ee5 (svn 202558:202559)
[chromium-blink-merge.git] / third_party / cld / encodings / compact_lang_det / win / cld_strtoint.h
blob242f74d471e9021b08e9fcb4a9a52486cb1755af
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
6 #define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
8 #if !defined(CLD_WINDOWS)
10 //#include "cld/base/strtoint.h"
12 #else
14 #include <stdlib.h>
16 #include "encodings/compact_lang_det/win/cld_basictypes.h"
18 // This implementation is not as good as the one in base/strtoint.h,
19 // but it's sufficient for our purposes.
20 inline int32 strto32(const char *nptr, char **endptr, int base) {
21 return static_cast<int32>(strtol(nptr, endptr, base));
24 #endif
26 #endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_