diff options
author | Philipp A. Hartmann <pah@qo.cx> | 2014-09-16 12:42:14 +0400 |
---|---|---|
committer | Philipp A. Hartmann <pah@qo.cx> | 2014-09-16 12:42:14 +0400 |
commit | 5117f9e555dd49921d699af09fcc6319490119b3 (patch) | |
tree | 45ce4128e24d1be33f9c4673007eaa85939f4001 /include/rapidjson/internal/dtoa.h | |
parent | c0bde81b03efd327b2fce56c9d81957714c19619 (diff) |
explicitly qualify C(++) library functions
Some compilers do not export the standard C library functions
to the global namespace, in case the C++ header variants are
included (<cstdlib>, <cstring>).
RapidJSON currently uses:
* malloc, realloc, free
* memcpy, memmove, memset, memcpy
Add an explicit namespace qualification to avoid lookup problems.
Diffstat (limited to 'include/rapidjson/internal/dtoa.h')
-rw-r--r-- | include/rapidjson/internal/dtoa.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rapidjson/internal/dtoa.h b/include/rapidjson/internal/dtoa.h index f8ecc273..de45e44f 100644 --- a/include/rapidjson/internal/dtoa.h +++ b/include/rapidjson/internal/dtoa.h @@ -362,14 +362,14 @@ inline char* Prettify(char* buffer, int length, int k) { } else if (0 < kk && kk <= 21) { // 1234e-2 -> 12.34 - memmove(&buffer[kk + 1], &buffer[kk], length - kk); + std::memmove(&buffer[kk + 1], &buffer[kk], length - kk); buffer[kk] = '.'; return &buffer[length + 1]; } else if (-6 < kk && kk <= 0) { // 1234e-6 -> 0.001234 const int offset = 2 - kk; - memmove(&buffer[offset], &buffer[0], length); + std::memmove(&buffer[offset], &buffer[0], length); buffer[0] = '0'; buffer[1] = '.'; for (int i = 2; i < offset; i++) @@ -383,7 +383,7 @@ inline char* Prettify(char* buffer, int length, int k) { } else { // 1234e30 -> 1.234e33 - memmove(&buffer[2], &buffer[1], length - 1); + std::memmove(&buffer[2], &buffer[1], length - 1); buffer[1] = '.'; buffer[length + 1] = 'e'; return WriteExponent(kk - 1, &buffer[0 + length + 2]); |