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

Unified Diff: webrtc/test/testsupport/frame_reader.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_reader.cc
diff --git a/webrtc/test/testsupport/frame_reader.cc b/webrtc/test/testsupport/frame_reader.cc
index 2593afd8c8cb002137fe4216f36d777a5fe19a5d..6f9042a465f3f9427d0ad429af94c837b0c1a456 100644
--- a/webrtc/test/testsupport/frame_reader.cc
+++ b/webrtc/test/testsupport/frame_reader.cc
@@ -20,11 +20,12 @@ namespace webrtc {
namespace test {
FrameReaderImpl::FrameReaderImpl(std::string input_filename,
- int width, int height)
+ int width,
+ int height)
: input_filename_(input_filename),
- width_(width), height_(height),
- input_file_(NULL) {
-}
+ width_(width),
+ height_(height),
+ input_file_(nullptr) {}
FrameReaderImpl::~FrameReaderImpl() {
Close();
@@ -40,7 +41,7 @@ bool FrameReaderImpl::Init() {
width_ * height_ + 2 * ((width_ + 1) / 2) * ((height_ + 1) / 2);
input_file_ = fopen(input_filename_.c_str(), "rb");
- if (input_file_ == NULL) {
+ if (input_file_ == nullptr) {
fprintf(stderr, "Couldn't open input file for reading: %s\n",
input_filename_.c_str());
return false;
@@ -57,15 +58,15 @@ bool FrameReaderImpl::Init() {
}
void FrameReaderImpl::Close() {
- if (input_file_ != NULL) {
+ if (input_file_ != nullptr) {
fclose(input_file_);
- input_file_ = NULL;
+ input_file_ = nullptr;
}
}
rtc::scoped_refptr<I420Buffer> FrameReaderImpl::ReadFrame() {
- if (input_file_ == NULL) {
- fprintf(stderr, "FrameReader is not initialized (input file is NULL)\n");
+ if (input_file_ == nullptr) {
+ fprintf(stderr, "FrameReader is not initialized (input file is null)\n");
return nullptr;
}
rtc::scoped_refptr<I420Buffer> buffer(

Powered by Google App Engine
This is Rietveld 408576698