[vlc-commits] Use empty() when applicable.

Rémi Duraffort git at videolan.org
Thu Mar 10 22:07:30 CET 2011


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Mar 10 22:04:11 2011 +0100| [37fbdd89d40a84d7aed3dab51832ae4bf6459bf3] | committer: Rémi Duraffort

Use empty() when applicable.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37fbdd89d40a84d7aed3dab51832ae4bf6459bf3
---

 modules/access/dshow/dshow.cpp  |    2 +-
 modules/access/dshow/filter.cpp |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 2088b0b..e024078 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1015,7 +1015,7 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
 
     /* Enumerate devices and display their names */
     FindCaptureDevice( p_this, NULL, &list_devices, b_audio );
-    if( !list_devices.size() )
+    if( list_devices.empty() )
         return VLC_EGENERIC;
 
     list<string>::iterator iter;
diff --git a/modules/access/dshow/filter.cpp b/modules/access/dshow/filter.cpp
index d27b455..1178225 100644
--- a/modules/access/dshow/filter.cpp
+++ b/modules/access/dshow/filter.cpp
@@ -260,7 +260,7 @@ HRESULT CapturePin::CustomGetSample( VLCMediaSample *vlc_sample )
     msg_Dbg( p_input, "CapturePin::CustomGetSample" );
 #endif
 
-    if( samples_queue.size() )
+    if( !samples_queue.empty() )
     {
         *vlc_sample = samples_queue.back();
         samples_queue.pop_back();
@@ -592,7 +592,7 @@ STDMETHODIMP CapturePin::EndFlush( void )
     VLCMediaSample vlc_sample;
 
     vlc_mutex_lock( &p_sys->lock );
-    while( samples_queue.size() )
+    while( !samples_queue.empty() )
     {
         vlc_sample = samples_queue.back();
         samples_queue.pop_back();



More information about the vlc-commits mailing list