]> git.llucax.com Git - z.facultad/75.52/treemulator.git/commitdiff
Arreglo logica de seleccion de nodo.
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Tue, 1 Nov 2005 05:18:12 +0000 (05:18 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Tue, 1 Nov 2005 05:18:12 +0000 (05:18 +0000)
src/btree.cpp

index 26224a515547a10dac3c2689e3d7b59f7d66ccc2..e78a91e406688633f1818fad4464e9776f9b8c03 100644 (file)
@@ -1181,9 +1181,9 @@ uchar *BTree::NewBlock (uint &num)
        BTreeNodeHeader nh;
 
        std::list<uint>::iterator it;
        BTreeNodeHeader nh;
 
        std::list<uint>::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 {
                num = *it;
                deleted_nodes.erase (it);
        } else {