mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 08:20:02 -05:00
build: Remove all static variables from headers to hopefully fix plugins
This commit is contained in:
@@ -7,9 +7,13 @@
|
||||
|
||||
namespace hex::dp {
|
||||
|
||||
int Node::s_idCounter = 1;
|
||||
namespace {
|
||||
|
||||
Node::Node(std::string unlocalizedTitle, std::vector<Attribute> attributes) : m_id(Node::s_idCounter++), m_unlocalizedTitle(std::move(unlocalizedTitle)), m_attributes(std::move(attributes)) {
|
||||
int s_idCounter = 1;
|
||||
|
||||
}
|
||||
|
||||
Node::Node(std::string unlocalizedTitle, std::vector<Attribute> attributes) : m_id(s_idCounter++), m_unlocalizedTitle(std::move(unlocalizedTitle)), m_attributes(std::move(attributes)) {
|
||||
for (auto &attr : this->m_attributes)
|
||||
attr.setParentNode(this);
|
||||
}
|
||||
@@ -136,4 +140,9 @@ namespace hex::dp {
|
||||
this->m_overlay->getData() = data;
|
||||
}
|
||||
|
||||
void Node::setIdCounter(int id) {
|
||||
if (id > s_idCounter)
|
||||
s_idCounter = id;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user