DescentDevelopers / Descent3

Descent 3 by Outrage Entertainment
GNU General Public License v3.0
2.86k stars 245 forks source link

Minor improvements to `cf_OpenLibrary()`’s HOG2 id detection code #333

Closed Jayman2000 closed 4 months ago

Jayman2000 commented 4 months ago

Pull Request Type

Description

This PR contains two minor improvements to the code that detects whether or not .hog files actually begin with the ASCII characters HOG2. See the commit messages for details.

Related Issues

Screenshots (if applicable)

Checklist

Additional Comments

GravisZro commented 4 months ago

It would be better to simply replace #define HOG_TAG_STR "HOG2" with a std::string_view. However, my understanding is that @winterheart plans on replacing cfile.* and hogfile.* entirely which would negate any work on them.

winterheart commented 4 months ago

OK, ready to merge, thank you!