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

Unified Diff: webrtc/base/win32filesystem.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/base/win32filesystem.cc
diff --git a/webrtc/base/win32filesystem.cc b/webrtc/base/win32filesystem.cc
index 7e5ec832d65080eeda9587d423f241541be2d20b..ed9b69e608572eb0c1444c488088c750a1ad268a 100644
--- a/webrtc/base/win32filesystem.cc
+++ b/webrtc/base/win32filesystem.cc
@@ -60,15 +60,15 @@ bool Win32Filesystem::CreateFolder(const Pathname &pathname) {
}
}
- return (::CreateDirectory(path16.c_str(), NULL) != 0);
+ return (::CreateDirectory(path16.c_str(), nullptr) != 0);
}
FileStream *Win32Filesystem::OpenFile(const Pathname &filename,
const std::string &mode) {
FileStream *fs = new FileStream();
- if (fs && !fs->Open(filename.pathname().c_str(), mode.c_str(), NULL)) {
+ if (fs && !fs->Open(filename.pathname().c_str(), mode.c_str(), nullptr)) {
delete fs;
- fs = NULL;
+ fs = nullptr;
}
return fs;
}
@@ -105,7 +105,7 @@ bool Win32Filesystem::GetTemporaryFolder(Pathname &pathname, bool create,
return false;
pathname.clear();
pathname.SetFolder(ToUtf8(buffer));
- if (append != NULL) {
+ if (append != nullptr) {
RTC_DCHECK(!append->empty());
pathname.AppendFolder(*append);
}
@@ -210,7 +210,7 @@ bool Win32Filesystem::GetFileTime(const Pathname& path, FileTimeType which,
bool Win32Filesystem::GetAppPathname(Pathname* path) {
TCHAR buffer[MAX_PATH + 1];
- if (0 == ::GetModuleFileName(NULL, buffer, arraysize(buffer)))
+ if (0 == ::GetModuleFileName(nullptr, buffer, arraysize(buffer)))
return false;
path->SetPathname(ToUtf8(buffer));
return true;
@@ -221,7 +221,7 @@ bool Win32Filesystem::GetAppDataFolder(Pathname* path, bool per_user) {
RTC_DCHECK(!application_name_.empty());
TCHAR buffer[MAX_PATH + 1];
int csidl = per_user ? CSIDL_LOCAL_APPDATA : CSIDL_COMMON_APPDATA;
- if (!::SHGetSpecialFolderPath(NULL, buffer, csidl, TRUE))
+ if (!::SHGetSpecialFolderPath(nullptr, buffer, csidl, TRUE))
return false;
if (!IsCurrentProcessLowIntegrity() &&
!::GetLongPathName(buffer, buffer, arraysize(buffer)))
@@ -258,7 +258,7 @@ bool Win32Filesystem::GetDiskFreeSpace(const Pathname& path,
}
char drive[4];
std::wstring drive16;
- const wchar_t* target_drive = NULL;
+ const wchar_t* target_drive = nullptr;
if (path.GetDrive(drive, sizeof(drive))) {
drive16 = ToUtf16(drive);
target_drive = drive16.c_str();
@@ -268,7 +268,7 @@ bool Win32Filesystem::GetDiskFreeSpace(const Pathname& path,
return false;
} else {
// The path is probably relative. GetDriveType and GetDiskFreeSpaceEx
- // use the current drive if NULL is passed as the drive name.
+ // use the current drive if null is passed as the drive name.
// TODO: Add method to Pathname to determine if the path is relative.
// TODO: Add method to Pathname to convert a path to absolute.
}

Powered by Google App Engine
This is Rietveld 408576698