Opened 11 years ago
Closed 10 years ago
#598 closed defect (fixed)
ObserverProxy implementation bug
| Reported by: | Alpar Juttner | Owned by: | Alpar Juttner |
|---|---|---|---|
| Priority: | blocker | Milestone: | LEMON 1.4 release |
| Component: | core | Version: | hg main |
| Keywords: | Cc: | Pierre, Moulon, <pmoulon@…> | |
| Revision id: |
Description
From lemon-users by Pierre M:
Hi,
Thank you to develop and share the Lemon graph library.
By curiosity I have ran the code analyzer from Visual Studio on the Lemon library.
And it found some strange things in lemon/list_graph.hpp:
In all the ObserverProxy implementations we can see something like:
virtual void add(const std::vector<Node>& nodes) {
for (int i = nodes.size() - 1; i >= 0; ++i) {
snapshot.addNode(nodes[i]);
}
}
The increment step of the loop must be -- and not ++ !!
This error appears 18 times and must be fixed!
I'm using Lemon 1.3 and I have checked on the current mercurials files, the error is still there in the trunk.
Regards/ Cordialement, Pierre M
Change History (3)
comment:1 Changed 11 years ago by
| Cc: | Pierre Moulon <pmoulon@…> added |
|---|
comment:2 Changed 11 years ago by
comment:3 Changed 10 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fixed in branches 1.2, 1.3 and default, see [81f70097df81] and [2126945deb6a].


Are you sure it is 18? As far as I see only list_graph.h is affected, and I could only find 6 occurrences. Do I miss something?