From f7e5769f8dc5e11d949336a58c9cb9dbcfeeaee6 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 24 Apr 2023 14:14:00 +0200 Subject: [PATCH] u01: Fix type of children count in one case --- u01/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u01/node.cpp b/u01/node.cpp index dd3690b..3f0e0c0 100644 --- a/u01/node.cpp +++ b/u01/node.cpp @@ -80,7 +80,7 @@ std::string node::print_iterative() const { // Complex iteration (not default vector iteration is necessary, // to achieve the same output as the recursive approach. // Otherwise, the order of the children is reversed (due to LIFO). - for (unsigned int i = n->get_nr_children(); i > 0; i--) { + for (std::size_t i = n->get_nr_children(); i > 0; i--) { stack.push(std::make_pair(n->get_child(i - 1), depth + 1)); } } else {