OutpostUniverse / OP2Utility

C++ library for working with Outpost 2 related files and tasks.
MIT License
4 stars 0 forks source link

Convert ArtFile::Write to const member #279

Closed DanRStevens closed 5 years ago

DanRStevens commented 5 years ago

I think the design would be more natural if this became a const member method, rather than a static method which takes a const parameter. If we necessarily have to pass an ArtFile object, it should probably just be a member, and access the data through the implicit this pointer.


Related, I noticed PaletteHeader has a constructor which takes a const ArtFile&, which is never used. I was about to remove the parameter until I realized the constructor was overloaded, and removing the parameter would make it ambiguous. As the overloads do different initialization, I left it for now.


Related, the internals of this section of code can potentially be updated with proposals in Issue #277 and Issue #278.