diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-07-28 11:53:42 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2008-07-28 11:53:42 +0000 |
commit | ebd65e91e584ea49023f5c17c78009402a6cc515 (patch) | |
tree | 6d19a6949fee4ab41bf07d136b3e7958b511fc9b /ACE/ace/Registry.cpp | |
parent | 8c59e749819a06d0437ac8e6d97012b0d7c16eb8 (diff) | |
download | ATCD-ebd65e91e584ea49023f5c17c78009402a6cc515.tar.gz |
Mon Jul 28 11:52:13 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/Registry.cpp')
-rw-r--r-- | ACE/ace/Registry.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ACE/ace/Registry.cpp b/ACE/ace/Registry.cpp index 3b638e49b25..d20913634de 100644 --- a/ACE/ace/Registry.cpp +++ b/ACE/ace/Registry.cpp @@ -748,6 +748,8 @@ ACE_Registry::Naming_Context::name (ACE_TString &name) name = this->name_; } +// Empty list +static const ACE_Registry::Binding_List ace_binding_empty_list; // listing function: iterator creator // This is useful when there are many objects and contexts @@ -758,10 +760,8 @@ ACE_Registry::Naming_Context::list (u_long how_many, Binding_List &list, Binding_Iterator &iter) { - // Empty list - static const ACE_Registry::Binding_List empty_list; // Make sure that the list is empty - list = empty_list; + list = ace_binding_empty_list; // Correctly initalize the iterator iter.reset (); @@ -773,9 +773,7 @@ ACE_Registry::Naming_Context::list (u_long how_many, iter.current_enumeration (iter.object_iteration_); // Get the next <how_many> values - long result = iter.next_n (how_many, - list); - return result; + return iter.next_n (how_many, list); } @@ -784,10 +782,8 @@ ACE_Registry::Naming_Context::list (u_long how_many, int ACE_Registry::Naming_Context::list (Binding_List &list) { - // Empty list - static const ACE_Registry::Binding_List empty_list; // Make sure that the list is empty - list = empty_list; + list = ace_binding_empty_list; // Create an iterator ACE_Registry::Binding_Iterator iterator; @@ -875,10 +871,8 @@ int ACE_Registry::Binding_Iterator::next_n (u_long how_many, Binding_List &list) { - // Empty list - static const ACE_Registry::Binding_List empty_list; // Make sure that the list is empty - list = empty_list; + list = ace_binding_empty_list; return this->current_enumeration_->next_n (how_many, list); } |