X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f29a7129de56edca96ea8ef58576898c1e52ed6f..c0df682bb52a8bcab7c182fb45b340814b2eada8:/Model/include/and.h?ds=sidebyside diff --git a/Model/include/and.h b/Model/include/and.h index 7bd1a89..482576b 100644 --- a/Model/include/and.h +++ b/Model/include/and.h @@ -4,15 +4,15 @@ #include "logiccontrol.h" #include -#include +#include namespace PlaQui { namespace Model { /** Función AND Lógica */ -class And:LogicControl { +class And:public LogicControl { public: - And():LogicControl(MAX_INT,1) {} + And():LogicControl(INT_MAX,1) {} virtual ~And() {} virtual bool get_output() { @@ -21,8 +21,8 @@ public: /* Si tengo alguien conectado */ std::list::iterator it; for(it = in_list.begin(); it != in_list.end(); it++) { - mi_entrada = *it; - mi_salida &&= mi_entrada->get_output(); + mi_entrada = static_cast(*it); + mi_salida = mi_salida && mi_entrada->get_output(); } return mi_salida; }