diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-07 08:33:54 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-01-07 08:33:54 -0500 |
commit | e043a2432c4dacce56a308948188482fb230ff33 (patch) | |
tree | b8809e54bc3c516dabfa8eace3b51a92d5c8fbcd /src/common.cpp | |
parent | c7e3d72f0ef08cb9463cd8960bc29dad40e3bdcb (diff) | |
parent | 45edad31559852d306d59b50f380cb79c9f27dcc (diff) |
Hey, that's pretty good lighting!
Diffstat (limited to 'src/common.cpp')
-rw-r--r-- | src/common.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/common.cpp b/src/common.cpp index 7449a35..dbcef0b 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -1,4 +1,5 @@ #include <common.h> +#include <cstring> #include <cstdio> #include <chrono> @@ -11,6 +12,22 @@ unsigned int millis(void){ #endif // __WIN32__ +Condition::Condition(const char *_id,void *val){ + id = new char[strlen(_id)+1]; + strcpy(id,_id); + value = val; +} +Condition::~Condition(){ + delete[] id; +} + +bool Condition::sameID(const char *s){ + return !strcmp(id,s); +} +void *Condition::getValue(void){ + return value; +} + void DEBUG_prints(const char* file, int line, const char *s,...){ va_list args; printf("%s:%d: ",file,line); |