From: Ricardo Markiewicz Date: Wed, 14 Sep 2005 04:43:41 +0000 (+0000) Subject: Evito un par de loops infinitos. X-Git-Tag: 1_0-pre1~125 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/0997831a9dd5e4359fc70f7f7ff59c1a97132ddc?ds=sidebyside Evito un par de loops infinitos. --- diff --git a/src/btree.cpp b/src/btree.cpp index e6c0cf4..093377b 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -131,7 +131,6 @@ Clave* BTree::AddKeyR (const Clave *k, uint node_num, uint &left_child, uint &ri if ((*data) < (*datait)) /* Me pase, lo agrego aca! */ break; - it++; } node_keys.insert (it, data); WriteKeys (node, node_header, node_keys); @@ -316,9 +315,8 @@ void BTree::PrintNode (uint num) std::cout << "Items : " << node_header.item_count << std::endl; std::cout << "Free : " << node_header.free_space << " (" << (header.block_size - sizeof (BTreeNodeHeader)) << ")" << std::endl; while (it != node_keys.end ()) { - std::string s = *(*it); - std::cout << s << " "; - it++; + std::string s = (*it); + std::cout << "(" << s << ") "; } std::cout << std::endl;