[Date Prev][Date Next] [Chronological] [Thread] [Top]

add empty() methods to ldapc++ (ITS#1310)

Full_Name: Dan Gohman
Version: latest CVS
OS: Debian
URL: ftp://ftp.openldap.org/incoming/Dan-Gohman-010903.patch
Submission from: (NULL) (

I uploaded a patch that contains a few small changes
to the ldapc++ library that is in the contrib branch
of the OpenLDAP source tree.

The changes consist of adding empty() methods to the
various list classes that test if their list is empty,
and changed a places in the code to use it instead of
testing size against zero.

Along with making the list classes easier to use, this
also potentially improves performance for many C++
libraries because it is common to have std::list's size
method take linear time while the empty method takes
constant time.