Mercurial > otakunoraifu
diff 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 |
line wrap: on
line diff
--- a/scn2k/scn2k_cmd.cc +++ b/scn2k/scn2k_cmd.cc @@ -616,6 +616,40 @@ bool Flags::Exec(Cmd& cmd) { } /********************************************************************* +** SimpleCmd +*/ + +SimpleCmd::SimpleCmd(int a, int b, int c) +{ + cmd1 = a; + cmd2 = b; + cmd3 = c; +} + +SimpleCmd::SimpleCmd(void) +{ + cmd1 = cmd2 = cmd3 = 0; +} + +bool SimpleCmd::operator<(const SimpleCmd& cmd) const +{ + if (cmd1 < cmd.cmd1) return true; + else if (cmd1 > cmd.cmd1) return false; + + if (cmd2 < cmd.cmd2) return true; + else if (cmd2 > cmd.cmd2) return false; + + if (cmd3 < cmd.cmd3) return true; + else return false; +} + +bool SimpleCmd::operator==(const SimpleCmd& cmd) const +{ + return (cmd1 == cmd.cmd1 && cmd2 == cmd.cmd2 && cmd3 == cmd.cmd3); +} + + +/********************************************************************* ** Cmd */