From: Ricardo Markiewicz Date: Tue, 1 Nov 2005 05:18:12 +0000 (+0000) Subject: Arreglo logica de seleccion de nodo. X-Git-Tag: 1_0-pre2~4 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/58866104a92791fdba206b3042be2c2b181a1e81?ds=sidebyside;hp=61ad6c12c81dd37c54797f5b507cdb677211f49a Arreglo logica de seleccion de nodo. --- diff --git a/src/btree.cpp b/src/btree.cpp index 26224a5..e78a91e 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -1181,9 +1181,9 @@ uchar *BTree::NewBlock (uint &num) BTreeNodeHeader nh; std::list::iterator it; - it = deleted_nodes.begin (); - if (it != deleted_nodes.end ()) { + if (deleted_nodes.size ()) { + it = deleted_nodes.begin (); num = *it; deleted_nodes.erase (it); } else {