jsoncpp: Reset existing files to svn-release-0.5.0

This commit is contained in:
Martin Kröning
2020-06-18 20:35:17 +02:00
parent 0d44b8c7f9
commit 76f805fe9c
4 changed files with 10 additions and 18 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
#include "json/writer.h"
#include <json/writer.h>
#include <utility>
#include <assert.h>
#include <stdio.h>
@@ -111,7 +111,7 @@ std::string valueToString( bool value )
std::string valueToQuotedString( const char *value )
{
// Not sure how to handle unicode...
if (strpbrk(value, "\"\\\b\f\n\r\t") == nullptr && !containsControlCharacter( value ))
if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
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.
@@ -542,7 +542,7 @@ StyledWriter::normalizeEOL( const std::string &text )
// //////////////////////////////////////////////////////////////////
StyledStreamWriter::StyledStreamWriter( std::string indentation )
: document_(nullptr)
: document_(NULL)
, rightMargin_( 74 )
, indentation_( indentation )
{
@@ -559,7 +559,7 @@ StyledStreamWriter::write( std::ostream &out, const Value &root )
writeValue( root );
writeCommentAfterValueOnSameLine( root );
*document_ << "\n";
document_ = nullptr; // Forget the stream, for safety.
document_ = NULL; // Forget the stream, for safety.
}