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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.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/remote_bitrate_estimator/test/bwe_test_fileutils.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
index 5fe78a775898ee44ea5521d1c3c5504629ecdd11..0864269ba88318a3a33dd04f1bd685cbf69e77f4 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_fileutils.cc
@@ -25,9 +25,9 @@ namespace testing {
namespace bwe {
ResourceFileReader::~ResourceFileReader() {
- if (file_ != NULL) {
+ if (file_ != nullptr) {
fclose(file_);
- file_ = NULL;
+ file_ = nullptr;
}
}
@@ -54,7 +54,7 @@ ResourceFileReader* ResourceFileReader::Create(const std::string& filename,
const std::string& extension) {
std::string filepath = webrtc::test::ResourcePath(filename, extension);
FILE* file = fopen(filepath.c_str(), "rb");
- if (file == NULL) {
+ if (file == nullptr) {
BWE_TEST_LOGGING_CONTEXT("ResourceFileReader");
BWE_TEST_LOGGING_LOG1("Create", "Can't read file: %s", filepath.c_str());
return 0;
@@ -64,9 +64,9 @@ ResourceFileReader* ResourceFileReader::Create(const std::string& filename,
}
OutputFileWriter::~OutputFileWriter() {
- if (file_ != NULL) {
+ if (file_ != nullptr) {
fclose(file_);
- file_ = NULL;
+ file_ = nullptr;
}
}
@@ -83,10 +83,10 @@ OutputFileWriter* OutputFileWriter::Create(const std::string& filename,
std::string filepath = webrtc::test::OutputPath() + filename + "." +
extension;
FILE* file = fopen(filepath.c_str(), "wb");
- if (file == NULL) {
+ if (file == nullptr) {
BWE_TEST_LOGGING_CONTEXT("OutputFileWriter");
BWE_TEST_LOGGING_LOG1("Create", "Can't write file: %s", filepath.c_str());
- return NULL;
+ return nullptr;
} else {
return new OutputFileWriter(file);
}

Powered by Google App Engine
This is Rietveld 408576698