[cleanup] Replace uses of NULL with nullptr
Generated using clang-tidy,
tools/clang/scripts/build_clang_tools_extra.py \
--fetch out/Default clang-tidy clang-apply-replacements
ninja -C out/Default
gn gen out/Default --export-compile-commands
cd out/Default
tools/clang/third_party/llvm/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -p . \
-clang-tidy-binary out/Default/tools/clang/third_party/llvm/build/bin/clang-tidy \
-clang-apply-replacements-binary \
out/Default/tools/clang/third_party/llvm/build/bin/clang-apply-replacements \
-checks='-*,modernize-use-nullptr' \
-fix
This CL was uploaded by git cl split.
Bug: webrtc:42232237
Change-Id: I4847ca2b337a4507ae9daf1dbd5f52e7cd15b55d
No-Iwyu: LSC
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/391843
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44665}
diff --git a/common_video/libyuv/libyuv_unittest.cc b/common_video/libyuv/libyuv_unittest.cc
index fed19fd..375eb4a 100644
--- a/common_video/libyuv/libyuv_unittest.cc
+++ b/common_video/libyuv/libyuv_unittest.cc
@@ -95,7 +95,7 @@
};
TestLibYuv::TestLibYuv()
- : source_file_(NULL),
+ : source_file_(nullptr),
orig_frame_(),
width_(352),
height_(288),
@@ -106,7 +106,7 @@
void TestLibYuv::SetUp() {
const std::string input_file_name = test::ResourcePath("foreman_cif", "yuv");
source_file_ = fopen(input_file_name.c_str(), "rb");
- ASSERT_TRUE(source_file_ != NULL)
+ ASSERT_TRUE(source_file_ != nullptr)
<< "Cannot read file: " << input_file_name << "\n";
scoped_refptr<I420BufferInterface> buffer(
@@ -120,10 +120,10 @@
}
void TestLibYuv::TearDown() {
- if (source_file_ != NULL) {
+ if (source_file_ != nullptr) {
ASSERT_EQ(0, fclose(source_file_));
}
- source_file_ = NULL;
+ source_file_ = nullptr;
}
TEST_F(TestLibYuv, ConvertTest) {
@@ -132,7 +132,7 @@
std::string output_file_name =
test::OutputPath() + "LibYuvTest_conversion.yuv";
FILE* output_file = fopen(output_file_name.c_str(), "wb");
- ASSERT_TRUE(output_file != NULL);
+ ASSERT_TRUE(output_file != nullptr);
double psnr = 0.0;
@@ -298,7 +298,7 @@
std::string output_file_name =
test::OutputPath() + "LibYuvTest_conversion.yuv";
FILE* output_file = fopen(output_file_name.c_str(), "wb");
- ASSERT_TRUE(output_file != NULL);
+ ASSERT_TRUE(output_file != nullptr);
double psnr = 0.0;