X-Git-Url: https://git.llucax.com/z.facultad/75.29/susanita.git/blobdiff_plain/a86e26ae42584c979262de7f6ddefa815ac7c625..dc520fd7ae38100afa95ee803755495f277c6473:/src/galeshapley.cpp diff --git a/src/galeshapley.cpp b/src/galeshapley.cpp index d76bb1b..613c8b7 100644 --- a/src/galeshapley.cpp +++ b/src/galeshapley.cpp @@ -27,8 +27,9 @@ primera_ronda() if (m.ofertas.empty()) continue; m.ordenar_ofertas(); - m.comprometer_con(*(m.ofertas.front())); + Persona& prometido = *(m.ofertas.front()); m.ofertas.pop_front(); + m.comprometer_con(prometido); } } @@ -106,19 +107,6 @@ todos_h_comprometidos() const return true; } -void -GaleShapley:: -mostrar_estado() const -{ - for (personas_type::const_iterator ih = hombres.begin(); - ih != hombres.end(); ++ih) - std::cout << **ih << "\n"; - std::cout << "\n"; - for (personas_type::const_iterator im = mujeres.begin(); - im != mujeres.end(); ++im) - std::cout << **im << "\n"; - std::cout << "\n" << std::endl; -} void GaleShapley::