summaryrefslogtreecommitdiff
path: root/Gate.cpp
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-29 22:45:32 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-29 22:45:32 +0930
commit1e76ef7d2df9d49a905f416774f33fdedfcf6f34 (patch)
tree22e37a8cb08cb84232e99bc235d20549a495d587 /Gate.cpp
parent11937e7d2256702698baba3acaf847523fe0f066 (diff)
downloadfoxlogicgates-1e76ef7d2df9d49a905f416774f33fdedfcf6f34.tar.gz
foxlogicgates-1e76ef7d2df9d49a905f416774f33fdedfcf6f34.zip
Logic: created ned Object class and derived gates from that
This class will allow us to make new devices (displays, custom gates etc) easily
Diffstat (limited to 'Gate.cpp')
-rw-r--r--Gate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Gate.cpp b/Gate.cpp
index 51a1652..a1ed3a7 100644
--- a/Gate.cpp
+++ b/Gate.cpp
@@ -15,7 +15,7 @@
#include "Gate.h"
-int Gate::gate_id_counter = 0;
+int Object::object_id_counter = 0; // initialise static object counter FIXME: do it somehwere else?
Gate::Gate(GATE_TYPE type, int x, int y, int width, int height, int loaded_id)
{
@@ -28,7 +28,7 @@ Gate::Gate(GATE_TYPE type, int x, int y, int width, int height, int loaded_id)
if (loaded_id != -1)
this->id = loaded_id;
else
- this->id = Gate::gate_id_counter++; // increment counter after assigning
+ this->id = Object::object_id_counter++; // increment counter after assigning
this->x = x;
this->y = y;
this->w = width;