From 308c1fe093a3277ec74a7c0c4bf8934b7e22002b Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Wed, 4 Jan 2017 14:05:20 -0500 Subject: Return Graph by const reference --- src/brandes.cc | 2 +- src/parse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/brandes.cc b/src/brandes.cc index 7c7d529..809ccd4 100644 --- a/src/brandes.cc +++ b/src/brandes.cc @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { Parser parser(input_file); - Graph graph = parser.get_graph(); + const Graph &graph = parser.get_graph(); return 0; } diff --git a/src/parse.h b/src/parse.h index 3f86eec..ec86302 100644 --- a/src/parse.h +++ b/src/parse.h @@ -15,7 +15,7 @@ public: } } - Graph get_graph() { + const Graph & get_graph() { return graph_; } private: -- cgit v1.2.3