File: 0003-Fix-wrong-iteration-in-ListGraph-snapshot-part-II.-5.patch

package info (click to toggle)
liblemon 1.3.1%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,240 kB
  • sloc: cpp: 64,054; sh: 463; xml: 170; makefile: 29; ansic: 3
file content (30 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Author: Alpar Juttner <alpar@cs.elte.hu>
Last-Update: 2015-05-22
Description: Fix wrong iteration in ListGraph snapshot, part II. (#598)

---
 lemon/list_graph.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lemon/list_graph.h b/lemon/list_graph.h
index 2a236cf..1964f7d 100644
--- a/lemon/list_graph.h
+++ b/lemon/list_graph.h
@@ -2299,7 +2299,7 @@ namespace lemon {
           snapshot.addNode(node);
         }
         virtual void add(const std::vector<Node>& nodes) {
-          for (int i = nodes.size() - 1; i >= 0; ++i) {
+          for (int i = nodes.size() - 1; i >= 0; --i) {
             snapshot.addNode(nodes[i]);
           }
         }
@@ -2349,7 +2349,7 @@ namespace lemon {
           snapshot.addEdge(edge);
         }
         virtual void add(const std::vector<Edge>& edges) {
-          for (int i = edges.size() - 1; i >= 0; ++i) {
+          for (int i = edges.size() - 1; i >= 0; --i) {
             snapshot.addEdge(edges[i]);
           }
         }