dolphin/Source/Core/VideoCommon
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
..
AbstractTexture.cpp HiresTextures: Support loading BC7 (BPTC) from DDS files 2017-08-01 11:59:38 +10:00
AbstractTexture.h AbstractTexture: Return config by const reference 2017-06-18 23:38:42 -04:00
AsyncRequests.cpp VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
AsyncRequests.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
AsyncShaderCompiler.cpp VideoBackends: Support a different number of threads for precompiling 2017-07-30 17:43:59 +10:00
AsyncShaderCompiler.h VideoBackends: Support a different number of threads for precompiling 2017-07-30 17:43:59 +10:00
AVIDump.cpp do not assign in conditional statements 2017-06-07 20:09:44 -07:00
AVIDump.h MSVC: define HAVE_FFMPEG 2017-05-26 00:53:58 -07:00
BoundingBox.cpp
BoundingBox.h
BPFunctions.cpp VideoCommon: Drop SetDitherMode() 2017-04-18 21:55:22 +10:00
BPFunctions.h VideoCommon: Drop SetDitherMode() 2017-04-18 21:55:22 +10:00
BPMemory.cpp BPMemory: Convert a number of unions to BitFields 2017-07-30 17:43:59 +10:00
BPMemory.h Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
BPStructs.cpp Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
BPStructs.h
CMakeLists.txt ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
CommandProcessor.cpp CommandProcessor: Limit scope of ugly SCPFifoStruct. 2017-01-27 19:04:56 +01:00
CommandProcessor.h CommandProcessor: Limit scope of ugly SCPFifoStruct. 2017-01-27 19:04:56 +01:00
ConstantManager.h Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
CPMemory.cpp
CPMemory.h specify custom brace style to fix unions 2017-01-05 12:55:13 +01:00
DataReader.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
Debugger.cpp
Debugger.h
DriverDetails.cpp Vulkan: Add a driver bug for NV when MSAA is enabled 2017-08-03 17:40:15 +10:00
DriverDetails.h Vulkan: Add a driver bug for NV when MSAA is enabled 2017-08-03 17:40:15 +10:00
Fifo.cpp Change "blocking" BlockingLoop::Stop to give up and die after a timeout. 2017-06-25 20:47:30 -07:00
Fifo.h Fifo: const correctness 2017-03-26 23:08:33 -04:00
FPSCounter.cpp VideoCommon: Improve precision of FPS counter 2017-07-30 12:38:48 +10:00
FPSCounter.h VideoCommon: Improve precision of FPS counter 2017-07-30 12:38:48 +10:00
FramebufferManagerBase.cpp VideoCommon: Fix crash at startup with virtual XFB enabled 2017-03-09 23:39:48 +10:00
FramebufferManagerBase.h VideoCommon: Fix crash at startup with virtual XFB enabled 2017-03-09 23:39:48 +10:00
GeometryShaderGen.cpp GeometryShaderGen: Add UID enumeration functions 2017-07-30 17:43:59 +10:00
GeometryShaderGen.h GeometryShaderGen: Add UID enumeration functions 2017-07-30 17:43:59 +10:00
GeometryShaderManager.cpp ShaderManagers: Use aggregate initialization for some variables. 2016-12-10 17:33:51 -05:00
GeometryShaderManager.h VideoBackends: Merge Initialize and Shutdown functions. 2016-06-26 12:34:59 +02:00
HiresTextures_DDSLoader.cpp HiresTextures: Support loading BC7 (BPTC) from DDS files 2017-08-01 11:59:38 +10:00
HiresTextures.cpp Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
HiresTextures.h Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
ImageWrite.cpp Add a namespace to OpenFStream 2017-06-15 21:34:04 +02:00
ImageWrite.h ImageWriter: Don't use inplace alpha truncation. 2016-10-08 12:02:49 +02:00
IndexGenerator.cpp fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
IndexGenerator.h
LightingShaderGen.cpp ShaderGenCommon: Remove unnecessary includes 2017-02-01 12:19:55 -05:00
LightingShaderGen.h LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
LookUpTables.h
MainBase.cpp VideoCommon: Move WM_USER_CREATE message to after backend initialization 2017-07-30 17:43:59 +10:00
NativeVertexFormat.h Remove NonCopyable 2017-08-22 16:40:34 +02:00
OnScreenDisplay.cpp Revert "Merge pull request #4286 from shuffle2/Aestek-clean-osd" 2016-10-15 12:44:37 +02:00
OnScreenDisplay.h Revert "Merge pull request #4286 from shuffle2/Aestek-clean-osd" 2016-10-15 12:44:37 +02:00
OpcodeDecoding.cpp CommandProcessor: Limit scope of ugly SCPFifoStruct. 2017-01-27 19:04:56 +01:00
OpcodeDecoding.h OpcodeDecoding: Convert #defines into enum constants 2017-02-08 00:05:17 -05:00
PerfQueryBase.cpp
PerfQueryBase.h
PixelEngine.cpp ShaderGen: Implement pixel ubershaders 2017-07-30 17:43:59 +10:00
PixelEngine.h PixelEngine: Move enum constants into the PixelEngine namespace 2017-02-28 07:01:50 -05:00
PixelShaderGen.cpp Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
PixelShaderGen.h Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
PixelShaderManager.cpp Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
PixelShaderManager.h Ubershaders: Fix 6-bit color truncation not being applied 2017-08-01 00:01:09 +10:00
PostProcessing.cpp replace DoFileSearch with optimized version 2017-06-23 17:25:53 -07:00
PostProcessing.h VideoConfigDiag: Move post-processing shader list to post processor 2017-04-25 14:27:05 +10:00
RenderBase.cpp Config: Include SYSCONF in base layer 2017-08-11 15:36:31 +08:00
RenderBase.h Remove non-integer IRs 2017-08-08 12:09:50 +02:00
RenderState.cpp RenderState: Fix incorrect blending factors when removing the color usage. 2017-08-21 16:33:10 +02:00
RenderState.h OGL: Drop BlendingState.dither 2017-04-18 21:55:23 +10:00
SamplerCommon.h
sfont.inc
ShaderGenCommon.cpp ShaderGen: Implement pixel ubershaders 2017-07-30 17:43:59 +10:00
ShaderGenCommon.h ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
Statistics.cpp VertexLoaderManager: Return debug strings by value 2017-03-26 23:50:09 -04:00
Statistics.h
TextureCacheBase.cpp VideoCommon: Fix typo in comments introduced by #5849 2017-08-09 00:02:27 -07:00
TextureCacheBase.h Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureConfig.cpp Video Backends: Split texture cache code out into separate files, introduce 'AbstractTexture' 2017-06-13 00:41:51 -05:00
TextureConfig.h HiresTextures: Support loading BC7 (BPTC) from DDS files 2017-08-01 11:59:38 +10:00
TextureConversionShader.cpp Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureConversionShader.h Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureDecoder_Common.cpp VideoCommon: Fix bug #10464 (RA4 format not handled in TextureDecoder) 2017-08-21 10:22:15 -07:00
TextureDecoder_Generic.cpp Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureDecoder_Util.h TextureDecoder: Deduplicate some utility code 2017-01-15 20:23:26 +11:00
TextureDecoder_x64.cpp Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
TextureDecoder.h Video: Clearly separate Texture and EFB Copy formats 2017-08-03 18:35:29 -07:00
UberShaderCommon.cpp Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
UberShaderCommon.h Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
UberShaderPixel.cpp UberShaderPixel: Use an if trees instead of switch statements on GL 2017-08-12 00:16:19 +10:00
UberShaderPixel.h ShaderGen: Implement pixel ubershaders 2017-07-30 17:43:59 +10:00
UberShaderVertex.cpp Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
UberShaderVertex.h ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VertexLoader_Color.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Color.h
VertexLoader_Normal.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Normal.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Position.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_Position.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_TextCoord.cpp Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader_TextCoord.h Common: Move byte swapping utilities into their own header 2017-03-03 17:18:18 -05:00
VertexLoader.cpp VertexLoaderJit: Fix out-of-bounds access for zfreeze. 2016-09-17 16:47:12 +02:00
VertexLoader.h
VertexLoaderARM64.cpp Merge pull request #4210 from degasus/arm 2016-09-27 18:45:14 +02:00
VertexLoaderARM64.h
VertexLoaderBase.cpp VertexLoaderBase: Return debug strings by value 2017-03-26 23:49:59 -04:00
VertexLoaderBase.h fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
VertexLoaderManager.cpp Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
VertexLoaderManager.h Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
VertexLoaderUtils.h
VertexLoaderX64.cpp Remove code for only allocating low memory 2017-05-20 09:35:53 +02:00
VertexLoaderX64.h
VertexManagerBase.cpp XFMemory: Convert several registers to bitfields 2017-07-30 17:43:59 +10:00
VertexManagerBase.h VideoCommon: rework anamorphic widescreen heuristic 2017-04-05 17:23:16 -07:00
VertexShaderGen.cpp ShaderGen: Use consistent variable names for texture coordinates 2017-07-30 17:43:59 +10:00
VertexShaderGen.h ShaderGen: Pass host config to shader generation functions 2017-07-20 17:54:33 +10:00
VertexShaderManager.cpp Remove non-integer IRs 2017-08-08 12:09:50 +02:00
VertexShaderManager.h ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VideoBackendBase.cpp Remove D3D12 2017-05-18 17:01:12 -07:00
VideoBackendBase.h CommandProcessor: Limit scope of ugly SCPFifoStruct. 2017-01-27 19:04:56 +01:00
VideoCommon.h Video Backends: Move and rename HostTextureFormat to AbstractTextureFormat 2017-06-13 00:41:56 -05:00
VideoCommon.vcxproj ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VideoCommon.vcxproj.filters ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
VideoConfig.cpp Merge pull request #5867 from leoetlino/widescreen 2017-08-11 18:23:54 +08:00
VideoConfig.h Remove non-integer IRs 2017-08-08 12:09:50 +02:00
VideoState.cpp VertexManagerBase: Get rid of static behavior 2016-08-21 23:30:38 -04:00
VideoState.h VideoBackends: Merge Initialize and Shutdown functions. 2016-06-26 12:34:59 +02:00
XFMemory.cpp
XFMemory.h XFMemory: Convert several registers to bitfields 2017-07-30 17:43:59 +10:00
XFStructs.cpp ShaderGen: Implement vertex ubershaders 2017-07-30 17:43:59 +10:00
XFStructs.h