SSBMTonberry / tileson

A modern and helpful cross-platform json-parser for C++, used for parsing Tiled maps.
BSD 2-Clause "Simplified" License
193 stars 30 forks source link

Fix user overrides of class attributes #105

Closed tmpsantos closed 1 year ago

tmpsantos commented 1 year ago

When setting a class as property of another class, the attributes are inherited and an override can be set for a attribute.

Previously when any override was set, the class was being replaced by an empty class because it could not be found in the project, because the reference to the project was not present in the add method.

The reference was now added with an extra method to get the Project pointer to make the compiler happy when building the amalgamation.

Fixes #104

SSBMTonberry commented 1 year ago

@tmpsantos : Thank you very much for your contribution! :smile: Seems like I forgot to make tests for classes that were sub-classes of other classes. Thanks for figuring this out and solving the problem :slightly_smiling_face: