Fix the awfull code.
This commit is contained in:
parent
2d470a3682
commit
6741a85820
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user