magnopus-opensource / connected-spaces-platform

"An interoperable communication library for the spatial internet."
https://www.magnopus.com/csp
Apache License 2.0
89 stars 12 forks source link

[OB-3719] fix: static initialization #501

Closed MAG-mv closed 1 month ago

MAG-mv commented 1 month ago
MAG-SamBirley commented 1 month ago

Do we know why it's static at all? What I always interpreted that function to be was a unique identifier per-component, in which case having it be just a local variable initialised every time would make more sense?

Might be missing something though.

MAG-SamBirley commented 1 month ago

Sorry about that, misclick! 😱

MAG-mv commented 1 month ago

Do we need to consider scenarios where the entity is a child of another entity which is itself a child? Do we need to recurse up the parent tree calling GetUniqueComponentId in order to be certain it's truly unique?

Each entitys id is unique, so this should ensure uniqueness

MAG-SamBirley commented 1 month ago

Do we need to consider scenarios where the entity is a child of another entity which is itself a child? Do we need to recurse up the parent tree calling GetUniqueComponentId in order to be certain it's truly unique?

Each entitys id is unique, so this should ensure uniqueness

Right, yes of course! Thanks