From 276df8ea8b9761cc729048d8e5c42670debc5825 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Thu, 20 Dec 2012 08:47:38 +0100 Subject: [PATCH] Cosmetics. --- mtp_graph.cc | 4 +--- mtp_graph.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mtp_graph.cc b/mtp_graph.cc index 343ebf7..2832e71 100644 --- a/mtp_graph.cc +++ b/mtp_graph.cc @@ -63,9 +63,7 @@ void Edge::invert() { positivized_length = - positivized_length; origin_vertex->del_leaving_edge(this); terminal_vertex->add_leaving_edge(this); - Vertex *t = terminal_vertex; - terminal_vertex = origin_vertex; - origin_vertex = t; + swap(terminal_vertex, origin_vertex); } ////////////////////////////////////////////////////////////////////// diff --git a/mtp_graph.h b/mtp_graph.h index 1bfbe0c..883a67f 100644 --- a/mtp_graph.h +++ b/mtp_graph.h @@ -65,7 +65,7 @@ class MTPGraph { // Set the distance_from_source fields to the number of DP // iterations needed to update it. Abort if the graph is not a DAG. - int compute_dp_distances(); + int compute_dp_ranks(); int _nb_vertices, _nb_edges; Vertex *_source, *_sink; -- 2.39.5