dolphin/Source/Core/Core
JosJuice 09f3f9b41a Remove NonCopyable
The class NonCopyable is, like the name says, supposed to disallow
copying. But should it allow moving?

For a long time, NonCopyable used to not allow moving. (It declared
a deleted copy constructor and assigment operator without declaring
a move constructor and assignment operator, making the compiler
implicitly delete the move constructor and assignment operator.)
That's fine if the classes that inherit from NonCopyable don't need
to be movable or if writing the move constructor and assignment
operator by hand is fine, but that's not the case for all classes,
as I discovered when I was working on the DirectoryBlob PR.

Because of that, I decided to make NonCopyable movable in c7602cc,
allowing me to use NonCopyable in DirectoryBlob.h. That was however
an unfortunate decision, because some of the classes that inherit
from NonCopyable have incorrect behavior when moved by default-
generated move constructors and assignment operators, and do not
explicitly delete the move constructors and assignment operators,
relying on NonCopyable being non-movable.

So what can we do about this? There are four solutions that I can
think of:

1. Make NonCopyable non-movable and tell DirectoryBlob to suck it.

2. Keep allowing moving NonCopyable, and expect that classes that
   don't support moving will delete the move constructor and
   assignment operator manually. Not only is this inconsistent
   (having classes disallow copying one way and disallow moving
   another way), but deleting the move constructor and assignment
   operator manually is too easy to forget compared to how tricky
   the resulting problems are.

3. Have one "MovableNonCopyable" and one "NonMovableNonCopyable".
   It works, but it feels rather silly...

4. Don't have a NonCopyable class at all. Considering that deleting
   the copy constructor and assignment operator only takes two lines
   of code, I don't see much of a reason to keep NonCopyable. I
   suppose that there was more of a point in having NonCopyable back
   in the pre-C++11 days, when it wasn't possible to use "= delete".

I decided to go with the fourth one (like the commit title says).
The implementation of the commit is fairly straight-forward, though
I would like to point out that I skipped adding "= delete" lines
for classes whose only reason for being uncopyable is that they
contain uncopyable classes like File::IOFile and std::unique_ptr,
because the compiler makes such classes uncopyable automatically.
2017-08-22 16:40:34 +02:00
..
Boot Config: Include SYSCONF in base layer 2017-08-11 15:36:31 +08:00
Config Merge pull request #5867 from leoetlino/widescreen 2017-08-11 18:23:54 +08:00
ConfigLoaders Merge pull request #5867 from leoetlino/widescreen 2017-08-11 18:23:54 +08:00
Debugger SymbolDB: Blank stripped symbol name fixed 2017-08-16 04:07:19 +01:00
DSP Remove NonCopyable 2017-08-22 16:40:34 +02:00
FifoPlayer FifoRecorder: Don't allocate ~100.7MB on program startup 2017-06-19 02:47:26 -04:00
HLE Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
HW Remove NonCopyable 2017-08-22 16:40:34 +02:00
IOS Remove NonCopyable 2017-08-22 16:40:34 +02:00
PowerPC Merge pull request #5904 from leoetlino/indirect-include 2017-08-20 19:59:53 -04:00
ActionReplay.cpp LogManager: clean up header 2017-07-07 16:44:38 -07:00
ActionReplay.h CheatManager/ISOProperties: Refactor ActionReplay tabs as a class 2016-08-31 14:32:12 +10:00
Analytics.cpp Convert to/from old EFB scale numbering 2017-08-08 12:09:50 +02:00
Analytics.h ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
ARDecrypt.cpp do not assign in conditional statements 2017-06-07 20:09:44 -07:00
ARDecrypt.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
BootManager.cpp Config: Fix Movie config loading/saving 2017-08-11 15:36:32 +08:00
BootManager.h Boot: Clean up the boot code 2017-06-06 16:27:52 +02:00
CMakeLists.txt Merge pull request #5929 from JonnyH/PR/fix-oprofile-build-linked-as-needed 2017-08-17 03:06:59 +08:00
CommonTitles.h IOS/ES: Refuse to launch the shop with default credentials 2017-06-26 20:30:13 +02:00
ConfigManager.cpp Config: Set DOL/ELF region to UNKNOWN 2017-08-11 20:28:33 +08:00
ConfigManager.h Remove NonCopyable 2017-08-22 16:40:34 +02:00
Core.cpp Core: Reset s_wants_determinism on shutdown 2017-07-31 15:38:39 +08:00
Core.h Replace balanced Core::PauseAndLock calls with RunAsCPUThread 2017-07-21 16:45:59 +08:00
Core.vcxproj USB: Add a stub HIDv5 implementation and use it for IOS59. 2017-08-15 22:35:45 +02:00
Core.vcxproj.filters USB: Add a stub HIDv5 implementation and use it for IOS59. 2017-08-15 22:35:45 +02:00
CoreTiming.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
CoreTiming.h JitArm64: Implement timer SPRs 2017-04-25 09:20:09 +01:00
DSPEmulator.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
DSPEmulator.h DSPEmulator: Amend variable casing 2017-01-18 12:20:13 -05:00
ec_wii.cpp EcWii: Add function to get the backup key 2017-07-21 17:42:59 +08:00
ec_wii.h EcWii: Add function to get the backup key 2017-07-21 17:42:59 +08:00
GeckoCode.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
GeckoCode.h GeckoCode: Provide operator== and operator!= overloads 2016-10-03 02:32:43 -04:00
GeckoCodeConfig.cpp Common: Add HttpRequest to simplify HTTP requests 2017-06-13 12:52:31 +02:00
GeckoCodeConfig.h Move GeckoCodeDiag download logic to GeckoCodeConfig 2017-04-05 12:48:35 -07:00
Host.h DolphinWX: Add a progress dialog host command 2017-07-30 12:38:48 +10:00
HotkeyManager.cpp DolphinWX: Use title case for hotkey group names 2017-07-26 08:00:17 +02:00
HotkeyManager.h Implement hotkey options group in HotkeyInputConfigDiag 2017-03-13 13:39:52 -07:00
MachineContext.h Initial support for Haiku. 2017-03-27 23:46:19 -04:00
MemoryWatcher.cpp Core: Change CoreTiming event key from int to EventType* 2016-09-03 14:55:44 +10:00
MemoryWatcher.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
MemTools.cpp JitInterface: Convert includes into forward declarations where applicable 2017-03-02 13:20:29 -05:00
MemTools.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Movie.cpp Config: Fix Movie config loading/saving 2017-08-11 15:36:32 +08:00
Movie.h Config: Fix Movie config loading/saving 2017-08-11 15:36:32 +08:00
NetPlayClient.cpp NetPlayClient/Server: apply Parameter Object pattern to traversal parameters 2017-08-13 18:50:52 -07:00
NetPlayClient.h NetPlayClient/Server: apply Parameter Object pattern to traversal parameters 2017-08-13 18:50:52 -07:00
NetPlayProto.h NetPlayClient/Server: apply Parameter Object pattern to traversal parameters 2017-08-13 18:50:52 -07:00
NetPlayServer.cpp NetPlayServer: handle port forwarding in constructor 2017-08-13 18:50:52 -07:00
NetPlayServer.h NetPlayServer: handle port forwarding in constructor 2017-08-13 18:50:52 -07:00
PatchEngine.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
PatchEngine.h PatchEngine: Add Reload() function 2017-04-09 14:02:33 +01:00
State.cpp IOS/SDIO: Add missing save calls in DoState 2017-08-07 00:48:16 +08:00
State.h Frame: Remove callback function prototypes from header 2017-04-03 06:34:36 -04:00
TitleDatabase.cpp Improve Japanese check in TitleDatabase 2017-07-16 14:33:14 +02:00
TitleDatabase.h TitleDatabase: Fix header includes 2017-05-22 02:02:04 +02:00
WiiRoot.cpp Core: Remove useless ShutdownWiiRoot calls 2017-06-10 20:00:43 +02:00
WiiRoot.h Remove pre-generated SYSCONF 2017-01-12 21:30:11 +01:00
WiiUtils.cpp WiiUtils: Add a disc updater 2017-08-10 23:47:18 +08:00
WiiUtils.h WiiUtils: Add a disc updater 2017-08-10 23:47:18 +08:00