From bc79dbe88f493daecc3493026a328fb10107f5f8 Mon Sep 17 00:00:00 2001 From: Zyro9922 Date: Sat, 29 Aug 2020 10:54:06 +0530 Subject: [PATCH] Cleaner code. Updated for loop. --- .../astronomy/coordinate/conversion/conversion_graph.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/boost/astronomy/coordinate/conversion/conversion_graph.hpp b/include/boost/astronomy/coordinate/conversion/conversion_graph.hpp index 76d263bb..67457e51 100644 --- a/include/boost/astronomy/coordinate/conversion/conversion_graph.hpp +++ b/include/boost/astronomy/coordinate/conversion/conversion_graph.hpp @@ -40,7 +40,6 @@ enum class COORDINATE_SYSTEM { ECLIPTIC, GALACTIC}; - struct CoordinateData { COORDINATE_SYSTEM coordinate_system; @@ -53,7 +52,7 @@ struct EdgeData matrix conv_matrix; }; -using graph_t = boost::adjacency_list; @@ -120,11 +119,7 @@ matrix convert(const COORDINATE_SYSTEM src, //Matrix Multiplication for(auto it = store_path.rbegin(); it + 1 != store_path.rend(); ++it) - { - auto a = *it; - auto b = *(it+1); - ans = prod(G[boost::edge(a,b,G).first].conv_matrix, ans); - } + ans = prod(G[boost::edge(*it,*(it+1),G).first].conv_matrix, ans); return ans; } \ No newline at end of file