Fix the awfull code.

This commit is contained in:
daniel 2017-04-10 19:09:13 -04:00
parent 2d470a3682
commit 6741a85820
2 changed files with 8 additions and 7 deletions

View File

@ -2,12 +2,12 @@
using namespace std;
event::event(event, value, setTime, wire) : evNum(event), evValue(value),
event::event(int num, int value, int setTime, int wire) : evNum(num), evValue(value),
evTime(setTime), wireNum(wire) {}
bool event::operator<(const event &e1, const event &e2) {
if(e1.evTime == e2.evTime) {
return e1.evNum > e2.evNum;
bool event::operator<(const event &e1) {
if(evTime == e1.evTime) {
return evNum > e1.evNum;
}
return e1.evTime > e2.evTime;
return evTime > e1.evTime;
}

View File

@ -1,10 +1,11 @@
#ifndef EVENT
#define EVENT
class event {
public:
event(event, value, setTime, wire);
bool operator<(const event &e1, const event &e2);
event(int num, int value, int setTime, int wire);
bool operator<(const event &e1);
private:
int evNum, evValue, evTime, wireNum;
};