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

Unified Diff: webrtc/modules/video_capture/linux/video_capture_linux.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/video_capture/linux/video_capture_linux.cc
diff --git a/webrtc/modules/video_capture/linux/video_capture_linux.cc b/webrtc/modules/video_capture/linux/video_capture_linux.cc
index e8da74bb2f33c7228d262c241b9c887c6c66ec21..f2ac0d78f0061f138bbbeebb08698a9710600cfd 100644
--- a/webrtc/modules/video_capture/linux/video_capture_linux.cc
+++ b/webrtc/modules/video_capture/linux/video_capture_linux.cc
@@ -51,9 +51,7 @@ VideoCaptureModuleV4L2::VideoCaptureModuleV4L2()
_currentFrameRate(-1),
_captureStarted(false),
_captureVideoType(kVideoI420),
- _pool(NULL)
-{
-}
+ _pool(nullptr) {}
int32_t VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
{
@@ -356,8 +354,8 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers()
return false;
}
- _pool[i].start = mmap(NULL, buffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
- _deviceFd, buffer.m.offset);
+ _pool[i].start = mmap(nullptr, buffer.length, PROT_READ | PROT_WRITE,
+ MAP_SHARED, _deviceFd, buffer.m.offset);
if (MAP_FAILED == _pool[i].start)
{
@@ -418,7 +416,7 @@ bool VideoCaptureModuleV4L2::CaptureProcess()
timeout.tv_sec = 1;
timeout.tv_usec = 0;
- retVal = select(_deviceFd + 1, &rSet, NULL, NULL, &timeout);
+ retVal = select(_deviceFd + 1, &rSet, nullptr, nullptr, &timeout);
if (retVal < 0 && errno != EINTR) // continue if interrupted
{
// select failed

Powered by Google App Engine
This is Rietveld 408576698