This moves all the byte swapping utilities into a header named Swap.h.
A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.
Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
Changed the Cheat Search tab to disable the scan buttons while there is
not a game running and enable when it starts. Also added double-click to
create code to the result list.
Cleanup code style.
Move ActionReplay code->INI saving into ActionReplay namespace.
Threadsafety Cleanup: ActionReplay is accessed from the Host, Emu
and CPU Threads so the internal storage needs to be protected by a
lock to prevent vectors/strings being deleted/moved while in use by
the CPU Thread.
UI Consistency: Make ARCodes behave like Gecko Codes - only apply
changes when Apply is pressed. Save changes to INI from CheatsWindow.
ISOProperties/CheatsWindow now synchronize with each other.
With auto-updating lists, searching for the previous value isn't
necessary. Also, this breaks out specific functionality into their own
functions, which helps separate UI code from the data processing code.
modified: Source/Core/DolphinWX/Cheats/CheatSearchTab.h
std::array does not have an initializer list constructor, instead (for
some reason) being defined to contain one public array member, allowing
it to be directly initialized. Thus the most explicit way to initialize
it is with two braces, one for the struct and one for the array. C++
allows the second pair of braces to be omitted, but clang complains
about it.