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

Unified Diff: webrtc/base/fileutils.cc

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Fixing Windows and formatting issues. 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
« no previous file with comments | « webrtc/base/fileutils.h ('k') | webrtc/base/fileutils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/fileutils.cc
diff --git a/webrtc/base/fileutils.cc b/webrtc/base/fileutils.cc
index a88399505469753dd9734a36d09df1d5898cacf7..ac21c18bcdaa8c4206b31a23cb286d1f2b3354c3 100644
--- a/webrtc/base/fileutils.cc
+++ b/webrtc/base/fileutils.cc
@@ -40,7 +40,8 @@ DirectoryIterator::DirectoryIterator()
#ifdef WEBRTC_WIN
: handle_(INVALID_HANDLE_VALUE) {
#else
- : dir_(NULL), dirent_(NULL) {
+ : dir_(nullptr),
+ dirent_(nullptr){
#endif
}
@@ -68,13 +69,13 @@ bool DirectoryIterator::Iterate(const Pathname &dir) {
if (handle_ == INVALID_HANDLE_VALUE)
return false;
#else
- if (dir_ != NULL)
+ if (dir_ != nullptr)
closedir(dir_);
dir_ = ::opendir(directory_.c_str());
- if (dir_ == NULL)
+ if (dir_ == nullptr)
return false;
dirent_ = readdir(dir_);
- if (dirent_ == NULL)
+ if (dirent_ == nullptr)
return false;
if (::stat(std::string(directory_ + Name()).c_str(), &stat_) != 0)
@@ -90,7 +91,7 @@ bool DirectoryIterator::Next() {
return ::FindNextFile(handle_, &data_) == TRUE;
#else
dirent_ = ::readdir(dir_);
- if (dirent_ == NULL)
+ if (dirent_ == nullptr)
return false;
return ::stat(std::string(directory_ + Name()).c_str(), &stat_) == 0;
@@ -116,7 +117,7 @@ std::string DirectoryIterator::Name() const {
#endif
}
-FilesystemInterface* Filesystem::default_filesystem_ = NULL;
+FilesystemInterface* Filesystem::default_filesystem_ = nullptr;
FilesystemInterface *Filesystem::EnsureDefaultFilesystem() {
if (!default_filesystem_) {
« no previous file with comments | « webrtc/base/fileutils.h ('k') | webrtc/base/fileutils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698