Bug 1375386 - Fix a -Wunused-lambda-capture warning r?jesup draft
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 22 Jun 2017 08:43:14 +0200
changeset 598750 e4a30e43ff16836d63a118ecb1482403a7cf3a0e
parent 598749 edb7e1ddd9b61e2af2a75cfe5baa0f92a54a2716
child 598751 b26bb824a8f706f37dfbe53022ff9990f63101b4
push id65311
push userbmo:sledru@mozilla.com
push dateThu, 22 Jun 2017 06:48:19 +0000
reviewersjesup
bugs1375386
milestone56.0a1
Bug 1375386 - Fix a -Wunused-lambda-capture warning r?jesup MozReview-Commit-ID: DEjcPY7ihWc
dom/media/systemservices/CamerasParent.cpp
--- a/dom/media/systemservices/CamerasParent.cpp
+++ b/dom/media/systemservices/CamerasParent.cpp
@@ -791,17 +791,17 @@ CamerasParent::RecvStartCapture(const Ca
       CallbackHelper** cbh;
       VideoEngine* engine = nullptr;
       int error = -1;
       if (self->EnsureInitialized(aCapEngine)) {
         cbh = self->mCallbacks.AppendElement(
           new CallbackHelper(static_cast<CaptureEngine>(aCapEngine), capnum, self));
 
         engine = self->mEngines[aCapEngine];
-        engine->WithEntry(capnum, [capnum, &engine, &error, &ipcCaps, &cbh](VideoEngine::CaptureEntry& cap) {
+        engine->WithEntry(capnum, [&engine, &error, &ipcCaps, &cbh](VideoEngine::CaptureEntry& cap) {
           error = 0;
           webrtc::VideoCaptureCapability capability;
           capability.width = ipcCaps.width();
           capability.height = ipcCaps.height();
           capability.maxFPS = ipcCaps.maxFPS();
           capability.expectedCaptureDelay = ipcCaps.expectedCaptureDelay();
           capability.rawType = static_cast<webrtc::RawVideoType>(ipcCaps.rawType());
           capability.codecType = static_cast<webrtc::VideoCodecType>(ipcCaps.codecType());
@@ -836,17 +836,17 @@ CamerasParent::RecvStartCapture(const Ca
   return IPC_OK();
 }
 
 void
 CamerasParent::StopCapture(const CaptureEngine& aCapEngine,
                            const int& capnum)
 {
   if (auto engine = EnsureInitialized(aCapEngine)) {
-    engine->WithEntry(capnum,[capnum](VideoEngine::CaptureEntry& cap){
+    engine->WithEntry(capnum,[](VideoEngine::CaptureEntry& cap){
       if (cap.VideoCapture()) {
         cap.VideoCapture()->StopCapture();
         cap.VideoCapture()->DeRegisterCaptureDataCallback();
       }
     });
     // we're removing elements, iterate backwards
     for (size_t i = mCallbacks.Length(); i > 0; i--) {
       if (mCallbacks[i-1]->mCapEngine == aCapEngine