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

Unified Diff: webrtc/modules/video_coding/test/test_util.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/modules/video_coding/test/test_util.cc
diff --git a/webrtc/modules/video_coding/test/test_util.cc b/webrtc/modules/video_coding/test/test_util.cc
index 386b4300a96a6c9c4226a380484243290ec95ccd..df29afdf1d43500723ac81ee982e99a0365adec1 100644
--- a/webrtc/modules/video_coding/test/test_util.cc
+++ b/webrtc/modules/video_coding/test/test_util.cc
@@ -69,8 +69,8 @@ FileOutputFrameReceiver::FileOutputFrameReceiver(
const std::string& base_out_filename,
uint32_t ssrc)
: out_filename_(),
- out_file_(NULL),
- timing_file_(NULL),
+ out_file_(nullptr),
+ timing_file_(nullptr),
width_(0),
height_(0),
count_(0) {
@@ -89,26 +89,26 @@ FileOutputFrameReceiver::FileOutputFrameReceiver(
}
FileOutputFrameReceiver::~FileOutputFrameReceiver() {
- if (timing_file_ != NULL) {
+ if (timing_file_ != nullptr) {
fclose(timing_file_);
}
- if (out_file_ != NULL) {
+ if (out_file_ != nullptr) {
fclose(out_file_);
}
}
int32_t FileOutputFrameReceiver::FrameToRender(webrtc::VideoFrame& video_frame,
rtc::Optional<uint8_t> qp) {
- if (timing_file_ == NULL) {
+ if (timing_file_ == nullptr) {
std::string basename;
std::string extension;
SplitFilename(out_filename_, &basename, &extension);
timing_file_ = fopen((basename + "_renderTiming.txt").c_str(), "w");
- if (timing_file_ == NULL) {
+ if (timing_file_ == nullptr) {
return -1;
}
}
- if (out_file_ == NULL || video_frame.width() != width_ ||
+ if (out_file_ == nullptr || video_frame.width() != width_ ||
video_frame.height() != height_) {
if (out_file_) {
fclose(out_file_);
@@ -120,7 +120,7 @@ int32_t FileOutputFrameReceiver::FrameToRender(webrtc::VideoFrame& video_frame,
AppendWidthHeightCount(out_filename_, width_, height_, count_);
++count_;
out_file_ = fopen(filename_with_width_height.c_str(), "wb");
- if (out_file_ == NULL) {
+ if (out_file_ == nullptr) {
return -1;
}
}

Powered by Google App Engine
This is Rietveld 408576698