- Description has changed:
Diff:
~~~~
--- old
+++ new
@@ -16,3 +16,4 @@
With C++11, erase(const_iterator) returns an iterator to the next element.
We can avoid resetting the iterator.
+Also some more improvements, see the patches for deatils.
~~~~
- **status**: review --> fixed
- **Comment**:
default (5.2)
[staging:804ef3]
changeset: 8472:804ef37099d5
user: Hung Nguyen <hung.d.ngu...@dektech.com.au>
date: Mon Dec 12 18:02:56 2016 +0700
summary: imm: Use return from map::erase() to avoid resetting iterator to
begin [#2224]
[staging:1ea1ab]
changeset: 8473:1ea1ab0f2a3e
user: Hung Nguyen <hung.d.ngu...@dektech.com.au>
date: Mon Dec 12 18:57:55 2016 +0700
summary: imm: Don't reset iterator to begin when clearing a map [#2224]
[staging:747028]
changeset: 8474:747028dc9837
user: Hung Nguyen <hung.d.ngu...@dektech.com.au>
date: Mon Dec 12 19:02:07 2016 +0700
summary: imm: Use erase(key_type) to remove all elements with specific key
[#2224]
---
** [tickets:#2224] imm: Improve the iteration in ImmModel**
**Status:** fixed
**Milestone:** 5.2.FC
**Created:** Mon Dec 12, 2016 07:09 AM UTC by Hung Nguyen
**Last Updated:** Tue Dec 13, 2016 08:10 AM UTC
**Owner:** Hung Nguyen
After removing an element from a map, the iterator is reset to begin.
</br>
~~~
for(ci2=sAdmReqContinuationMap.begin();
ci2!=sAdmReqContinuationMap.end();) {
if(ci2->second.mConn == dead) {
TRACE_5("Discarding Adm Req continuation %llu", ci2->first);
sAdmReqContinuationMap.erase(ci2);
ci2=sAdmReqContinuationMap.begin();
} else { ++ci2;}
}
~~~
</br>
With C++11, erase(const_iterator) returns an iterator to the next element.
We can avoid resetting the iterator.
Also some more improvements, see the patches for deatils.
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets