Commit Graph

8 Commits

Author SHA1 Message Date
JMC47 aa8226fa88
Merge pull request #12744 from nlebeck/settingshandler-split-2
Split `SettingsHandler` into separate reader and writer classes
2024-10-27 19:23:05 -04:00
Admiral H. Curtiss c13c11d230
Add missing algorithm header in SettingsHandlerTest.cpp 2024-10-22 23:48:43 +02:00
Niel Lebeck 1d79991ec4 Split `SettingsHandler` into separate reader and writer classes 2024-10-21 20:20:15 -07:00
mitaclaw 249defa72b Modernize `std::equal` with ranges 2024-10-10 00:53:48 -07:00
Niel Lebeck 36cdb4a544 Eliminate SettingsHandler's `SetBytes` and `Reset` methods
Also make the `Decrypt` method private.

As far as I can tell, the only motivation for exposing the `SetBytes`
and `Reset` methods is to allow `CBoot::SetupWiiMemory` to use the same
`SettingsHandler` instance to read settings data and then write it back.
It seems cleaner to just use two separate instances, and require a given
`SettingsHandler` instance to be used for either writing data to a
buffer or reading data from a buffer, but not both.

A natural next step is to split the `SettingsHandler` class into two
classes, one for writing data and one for reading data. I've deferred
that change for a future PR.
2024-04-23 17:19:01 -07:00
Niel Lebeck d2b96736e0 Pass SettingsHandler buffers by const ref instead of rvalue ref 2024-04-12 18:50:21 -07:00
Niel Lebeck 9029b7a082 Add SettingsHandler unit tests exercising the edge case in PR #8704 2024-03-06 22:08:30 -08:00
Niel Lebeck 0344ec6d79 Add simple unit tests for SettingsHandler 2024-03-01 20:52:45 -08:00