X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f7e6ba4976cdafcb4aa3e39b03539d5a3d12f6a4..e2a544ed0d4321fa6847389ea905f70b1655ee78:/Model/include/and.h?ds=inline diff --git a/Model/include/and.h b/Model/include/and.h index be71958..482576b 100644 --- a/Model/include/and.h +++ b/Model/include/and.h @@ -4,14 +4,15 @@ #include "logiccontrol.h" #include -#include +#include namespace PlaQui { namespace Model { -class And:LogicControl { +/** Función AND Lógica */ +class And:public LogicControl { public: - And():LogicControl(MAX_INT,1) {} + And():LogicControl(INT_MAX,1) {} virtual ~And() {} virtual bool get_output() { @@ -20,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; }