Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: webrtc/test/testsupport/frame_writer.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/test/testsupport/frame_writer.cc
diff --git a/webrtc/test/testsupport/frame_writer.cc b/webrtc/test/testsupport/frame_writer.cc
index 1b9e8a82efda2f1dd41e78a7ed0a8059e5847a3d..4423c440e049ad2272f4fb8ab11976758ee2e2f8 100644
--- a/webrtc/test/testsupport/frame_writer.cc
+++ b/webrtc/test/testsupport/frame_writer.cc
@@ -19,8 +19,7 @@ FrameWriterImpl::FrameWriterImpl(std::string output_filename,
size_t frame_length_in_bytes)
: output_filename_(output_filename),
frame_length_in_bytes_(frame_length_in_bytes),
- output_file_(NULL) {
-}
+ output_file_(nullptr) {}
FrameWriterImpl::~FrameWriterImpl() {
Close();
@@ -33,7 +32,7 @@ bool FrameWriterImpl::Init() {
return false;
}
output_file_ = fopen(output_filename_.c_str(), "wb");
- if (output_file_ == NULL) {
+ if (output_file_ == nullptr) {
fprintf(stderr, "Couldn't open output file for writing: %s\n",
output_filename_.c_str());
return false;
@@ -42,9 +41,9 @@ bool FrameWriterImpl::Init() {
}
void FrameWriterImpl::Close() {
- if (output_file_ != NULL) {
+ if (output_file_ != nullptr) {
fclose(output_file_);
- output_file_ = NULL;
+ output_file_ = nullptr;
}
}
@@ -52,8 +51,8 @@ size_t FrameWriterImpl::FrameLength() { return frame_length_in_bytes_; }
bool FrameWriterImpl::WriteFrame(uint8_t* frame_buffer) {
assert(frame_buffer);
- if (output_file_ == NULL) {
- fprintf(stderr, "FrameWriter is not initialized (output file is NULL)\n");
+ if (output_file_ == nullptr) {
+ fprintf(stderr, "FrameWriter is not initialized (output file is null)\n");
return false;
}
size_t bytes_written = fwrite(frame_buffer, 1, frame_length_in_bytes_,

Powered by Google App Engine
This is Rietveld 408576698