mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-07 09:04:57 +02:00
Fixed compilation issue on windows (avoid using cstring and use string.h instead).
This commit is contained in:
parent
f66d370741
commit
e1aad35ae5
@ -2,6 +2,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||||
@ -66,7 +67,7 @@ std::string valueToString( bool value )
|
|||||||
std::string valueToQuotedString( const char *value )
|
std::string valueToQuotedString( const char *value )
|
||||||
{
|
{
|
||||||
// Not sure how to handle unicode...
|
// Not sure how to handle unicode...
|
||||||
if (std::strpbrk(value, "\"\\\b\f\n\r\t") == NULL)
|
if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL)
|
||||||
return std::string("\"") + value + "\"";
|
return std::string("\"") + value + "\"";
|
||||||
// We have to walk value and escape any special characters.
|
// We have to walk value and escape any special characters.
|
||||||
// Appending to std::string is not efficient, but this should be rare.
|
// Appending to std::string is not efficient, but this should be rare.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user