[ekiga/gnome-2-26] Use the remove_all_objects method to flush a refreshing LDAP book (no more iterator use)



commit 5f670eea66731631bd862ce59bf2b9109e15a242
Author: Julien Puydt <jpuydt src gnome org>
Date:   Sun Mar 29 08:38:14 2009 +0000

    Use the remove_all_objects method to flush a refreshing LDAP book (no more iterator use)
    
    svn path=/trunk/; revision=7829
---
 lib/engine/components/ldap/ldap-book.cpp |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/lib/engine/components/ldap/ldap-book.cpp b/lib/engine/components/ldap/ldap-book.cpp
index 2f47549..7675110 100644
--- a/lib/engine/components/ldap/ldap-book.cpp
+++ b/lib/engine/components/ldap/ldap-book.cpp
@@ -437,12 +437,7 @@ void
 OPENLDAP::Book::refresh ()
 {
   /* we flush */
-  iterator iter = begin ();
-  while (iter != end ()) {
-
-    remove_contact (*iter);
-    iter = begin ();
-  }
+  remove_all_objects ();
 
   if (ldap_context == NULL)
     refresh_start ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]