OutpostUniverse / OP2Utility

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

Remove unused ArtFile variable from PaletteHeader constructor #283

Closed Brett208 closed 4 years ago

Brett208 commented 5 years ago

Currenty two constructor overloads exist for PaletteHeader.

PaletteHeader::PaletteHeader() : remainingTagCount(0) {}
PaletteHeader::PaletteHeader(const ArtFile& artFile)  : remainingTagCount(1)

The first one allows initializing the struct with minimum work but still making it viable. The second one initializes the header with regular values (which oddly enough does not require any input from ArtFile).

Perhaps changing the second constructor into a static function that returns a populated PaletteHeader would be more appropriate. Then the dummy ArtFile variable would no longer be needed.

DanRStevens commented 5 years ago

That sounds like a good plan.