H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 80 forks source link

Avoid exposing `plKey` implementation details #1429

Closed dgelessus closed 1 year ago

dgelessus commented 1 year ago

plKey's contents are separated into a public interface plKeyData and an internal implementation subclass plKeyImp. However, the main plKey API had an implicit conversion to plKeyImp, making it relatively easy to access the implementation details anyway.

This changes that to require an explicit method call, which only becomes available if you include the implementation header. This will make it easier to find all the places that rely on this conversion.

Confusingly, the implicit conversion was used quite often whenever a plKey was used as a boolean (to check if its underlying pointer is null). Those uses don't actually need the implementation details and are now handled by a simple operator bool.

Hoikas commented 1 year ago

The CI failure is due to nasm.us being down again, unfortunately.