Added parameter to DynamicJsonBuffer constructor to set initial size (issue #152)

This commit is contained in:
Benoit Blanchon
2015-11-09 21:37:40 +01:00
parent b7d9bb2765
commit ba3617c22f
3 changed files with 17 additions and 10 deletions

View File

@ -20,22 +20,22 @@ template <typename TFloat>
static TFloat parse(const char *);
template <>
FORCE_INLINE float parse<float>(const char *s) {
float parse<float>(const char *s) {
return static_cast<float>(strtod(s, NULL));
}
template <>
FORCE_INLINE double parse<double>(const char *s) {
double parse<double>(const char *s) {
return strtod(s, NULL);
}
template <>
FORCE_INLINE long parse<long>(const char *s) {
long parse<long>(const char *s) {
return strtol(s, NULL, 10);
}
template <>
FORCE_INLINE int parse<int>(const char *s) {
int parse<int>(const char *s) {
return atoi(s);
}