From 9db38c33f59fa7cb97f70fe208e7bcdc1aafd498 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 24 Apr 2023 14:20:42 +0200 Subject: [PATCH] =?UTF-8?q?u01:=20Don=E2=80=99t=20call=20make=5Fpair=20exp?= =?UTF-8?q?licitly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- u01/node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/u01/node.cpp b/u01/node.cpp index 3f0e0c0..ece43ab 100644 --- a/u01/node.cpp +++ b/u01/node.cpp @@ -65,7 +65,7 @@ std::string node::print_recursive(unsigned int depth, std::string node::print_iterative() const { std::stringstream output; std::stack> stack; - stack.push(std::make_pair(this, 0)); + stack.push({this, 0}); std::set visited = {}; while (!stack.empty()) { @@ -81,7 +81,7 @@ std::string node::print_iterative() const { // to achieve the same output as the recursive approach. // Otherwise, the order of the children is reversed (due to LIFO). for (std::size_t i = n->get_nr_children(); i > 0; i--) { - stack.push(std::make_pair(n->get_child(i - 1), depth + 1)); + stack.push({n->get_child(i - 1), depth + 1}); } } else { output << " [↝ " << n->get_name() << "]";