summaryrefslogtreecommitdiffstats
path: root/polly/lib/JSON/json_writer.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-04-16 07:33:47 +0000
committerTobias Grosser <tobias@grosser.es>2014-04-16 07:33:47 +0000
commit5a56cbf4965f0d7bcd9be4d1c15c559d398df96e (patch)
tree4d143e508f499bad2aa0050f018673a4c413771f /polly/lib/JSON/json_writer.cpp
parent6f375e5604590fc9c23d8a75176feb951de84211 (diff)
downloadbcm5719-llvm-5a56cbf4965f0d7bcd9be4d1c15c559d398df96e.tar.gz
bcm5719-llvm-5a56cbf4965f0d7bcd9be4d1c15c559d398df96e.zip
[C++11] Use nullptr
llvm-svn: 206361
Diffstat (limited to 'polly/lib/JSON/json_writer.cpp')
-rw-r--r--polly/lib/JSON/json_writer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/polly/lib/JSON/json_writer.cpp b/polly/lib/JSON/json_writer.cpp
index cdf4188f2ec..bf475c39df5 100644
--- a/polly/lib/JSON/json_writer.cpp
+++ b/polly/lib/JSON/json_writer.cpp
@@ -111,12 +111,12 @@ 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") == NULL && !containsControlCharacter( value ))
+ if (strpbrk(value, "\"\\\b\f\n\r\t") == nullptr && !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.
// (Note: forward slashes are *not* rare, but I am not escaping them.)
- unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
+ unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+nullptr
std::string result;
result.reserve(maxsize); // to avoid lots of mallocs
result += "\"";
@@ -542,7 +542,7 @@ StyledWriter::normalizeEOL( const std::string &text )
// //////////////////////////////////////////////////////////////////
StyledStreamWriter::StyledStreamWriter( std::string indentation )
- : document_(NULL)
+ : document_(nullptr)
, rightMargin_( 74 )
, indentation_( indentation )
{
@@ -559,7 +559,7 @@ StyledStreamWriter::write( std::ostream &out, const Value &root )
writeValue( root );
writeCommentAfterValueOnSameLine( root );
*document_ << "\n";
- document_ = NULL; // Forget the stream, for safety.
+ document_ = nullptr; // Forget the stream, for safety.
}
OpenPOWER on IntegriCloud