comparison scn2k/scn2k_cmd.cc @ 54:d7cde171a1de

* scn2k_grp.cc now handles commands in a cleanier way \o/ * some cleaning
author thib
date Mon, 20 Apr 2009 16:18:55 +0000
parents 15a18fbe6f21
children 3b1593186f12
comparison
equal deleted inserted replaced
53:ddbcbd000206 54:d7cde171a1de
612 cmd.SetSysvar(sum); 612 cmd.SetSysvar(sum);
613 } 613 }
614 } 614 }
615 return false; 615 return false;
616 } 616 }
617
618 /*********************************************************************
619 ** SimpleCmd
620 */
621
622 SimpleCmd::SimpleCmd(int a, int b, int c)
623 {
624 cmd1 = a;
625 cmd2 = b;
626 cmd3 = c;
627 }
628
629 SimpleCmd::SimpleCmd(void)
630 {
631 cmd1 = cmd2 = cmd3 = 0;
632 }
633
634 bool SimpleCmd::operator<(const SimpleCmd& cmd) const
635 {
636 if (cmd1 < cmd.cmd1) return true;
637 else if (cmd1 > cmd.cmd1) return false;
638
639 if (cmd2 < cmd.cmd2) return true;
640 else if (cmd2 > cmd.cmd2) return false;
641
642 if (cmd3 < cmd.cmd3) return true;
643 else return false;
644 }
645
646 bool SimpleCmd::operator==(const SimpleCmd& cmd) const
647 {
648 return (cmd1 == cmd.cmd1 && cmd2 == cmd.cmd2 && cmd3 == cmd.cmd3);
649 }
650
617 651
618 /********************************************************************* 652 /*********************************************************************
619 ** Cmd 653 ** Cmd
620 */ 654 */
621 655