mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 14:15:17 +00:00
Fixes for JS generator in VS
This commit is contained in:
@@ -90,8 +90,17 @@ inline std::string IntToStringHex(int i, int xdigits) {
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
// Portable implementation of strtoull().
|
||||
// Portable implementation of strtoll().
|
||||
inline int64_t StringToInt(const char *str, int base = 10) {
|
||||
#ifdef _MSC_VER
|
||||
return _strtoi64(str, nullptr, base);
|
||||
#else
|
||||
return strtoll(str, nullptr, base);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Portable implementation of strtoull().
|
||||
inline int64_t StringToUInt(const char *str, int base = 10) {
|
||||
#ifdef _MSC_VER
|
||||
return _strtoui64(str, nullptr, base);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user