mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01: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 <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
|
||||
#if _MSC_VER >= 1400 // VC++ 8.0
|
||||
@ -66,7 +67,7 @@ std::string valueToString( bool value )
|
||||
std::string valueToQuotedString( const char *value )
|
||||
{
|
||||
// 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 + "\"";
|
||||
// We have to walk value and escape any special characters.
|
||||
// Appending to std::string is not efficient, but this should be rare.
|
||||
|
Loading…
Reference in New Issue
Block a user