build: Remove all static variables from headers to hopefully fix plugins

This commit is contained in:
WerWolv
2023-07-26 13:50:51 +02:00
parent 866c87b2bf
commit 27c8e19c14
31 changed files with 236 additions and 225 deletions

View File

@@ -3,9 +3,16 @@
namespace hex::dp {
int Link::s_idCounter = 1;
namespace {
Link::Link(int from, int to) : m_id(Link::s_idCounter++), m_from(from), m_to(to) { }
int s_idCounter = 1;
}
Link::Link(int from, int to) : m_id(s_idCounter++), m_from(from), m_to(to) { }
void Link::setIdCounter(int id) {
if (id > s_idCounter)
s_idCounter = id;
}
}