Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move most pnUtils code into more appropriate places #1513

Merged
merged 4 commits into from
Oct 22, 2023

Conversation

dgelessus
Copy link
Contributor

pnUtils is a pretty random mix of unrelated things. This PR cleans things up a bit by moving code to more appropriate places (plEncryption.h/.cpp into pnEncryption) and removing duplicate APIs (TimeGetMs replaced by hsTimer::GetMilliSeconds).

The only thing left in pnUtils now is the UTF-16 StrCopy. I left that where it is for now, because it's not trivial to replace with ST::string or standard C++ APIs and it's still used in a couple of different places. (I could move it into CoreLib, but I don't want more weird string functions implicitly pulled in everywhere...)

@dpogue
Copy link
Member

dpogue commented Oct 21, 2023

(I could move it into CoreLib, but I don't want more weird string functions implicitly pulled in everywhere...)

CoreLib is where I had begrudgingly settled on StrCopy landing when I thought about doing this change myself.

Part of me would like to see plEncryption turned into something more like plRC4Encryption (and clean it up a bit to removed the unimplemented RSA code and maybe turn it into a class instance), but that could be work for another PR.

@Hoikas Hoikas merged commit 55ba2ae into H-uru:master Oct 22, 2023
14 checks passed
@dgelessus dgelessus deleted the reduce_pnutils branch November 29, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants