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; 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) {} evTime(setTime), wireNum(wire) {}
bool event::operator<(const event &e1, const event &e2) { bool event::operator<(const event &e1) {
if(e1.evTime == e2.evTime) { if(evTime == e1.evTime) {
return e1.evNum > e2.evNum; return evNum > e1.evNum;
} }
return e1.evTime > e2.evTime; return evTime > e1.evTime;
} }

View File

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