X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f7e6ba4976cdafcb4aa3e39b03539d5a3d12f6a4..4341c033f13578b5b3aeb3e08e20d3889cb2d7c7:/Model/include/or.h?ds=inline diff --git a/Model/include/or.h b/Model/include/or.h index 502fe41..b7d6d0c 100644 --- a/Model/include/or.h +++ b/Model/include/or.h @@ -4,14 +4,15 @@ #include "logiccontrol.h" #include -#include +#include namespace PlaQui { namespace Model { -class Or:LogicControl { +/** Función O Lógica */ +class Or:public LogicControl { public: - Or():LogicControl(MAX_INT,1) {} + Or():LogicControl(INT_MAX,1) {} virtual ~Or() {} 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_entrada || mi_entrada->get_output(); } return mi_salida; }