Fix a bug where a RAII object was created for just one line instead of a block.

Found by clang:

../../third_party/webrtc/video_engine/vie_render_manager.cc:157:3: error: expression result unused [-Werror,-Wunused-value]
  ViEManagerWriteScoped(*this);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Review URL: https://webrtc-codereview.appspot.com/599005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2309 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2012-05-28 18:56:20 +00:00
parent dbaa893525
commit ca8d788362

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@ -154,7 +154,7 @@ WebRtc_Word32 ViERenderManager::RemoveRenderStream(
const WebRtc_Word32 render_id) {
// We need exclusive right to the items in the render manager to delete a
// stream.
ViEManagerWriteScoped(*this);
ViEManagerWriteScoped scope(*this);
CriticalSectionScoped cs(list_cs_.get());
MapItem* map_item = stream_to_vie_renderer_.Find(render_id);