lairworks / nas2d-core

NAS2D is an open source, object oriented 2D game development framework written in portable C++.
http://nas2d.lairworks.com
zlib License
10 stars 6 forks source link

Remove Resource names #1127

Closed DanRStevens closed 1 year ago

DanRStevens commented 1 year ago

The Resource classes have a name field, which is largely unused outside of the constructor, which it might be used as a file path to load data from disk. There doesn't seem to be a clear need to store this value, so perhaps we should conserve memory by removing the name fields.

There was some discussion of this in:

ldicker83 commented 1 year ago

Generally agreed. In the early development of NAS2D the 'name' field was used as a way to handle caching. This ended up using string comparisons which are expensive so there were other methods used instead. I'm in favor of dropping this field.