mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-10 06:31:07 +00:00
Keeps associated data together. It also eliminates the possibility of out
parameters not being initialized properly. For example, consider the
following example:
-- some FramebufferManager implementation --
void FBMgrImpl::GetTargetSize(u32* width, u32* height) override
{
// Do nothing
}
-- somewhere else where the function is used --
u32 width, height;
framebuffer_manager_instance->GetTargetSize(&width, &height);
if (texture_width != width) <-- Uninitialized variable usage
{
...
}
It makes it much more obvious to spot any initialization issues, because
it requires something to be returned, as opposed to allowing an
implementation to just not do anything.
|
||
|---|---|---|
| .. | ||
| BoundingBox.cpp | ||
| BoundingBox.h | ||
| CMakeLists.txt | ||
| D3D12.vcxproj | ||
| D3D12.vcxproj.filters | ||
| D3DBase.cpp | ||
| D3DBase.h | ||
| D3DCommandListManager.cpp | ||
| D3DCommandListManager.h | ||
| D3DDescriptorHeapManager.cpp | ||
| D3DDescriptorHeapManager.h | ||
| D3DQueuedCommandList.cpp | ||
| D3DQueuedCommandList.h | ||
| D3DShader.cpp | ||
| D3DShader.h | ||
| D3DState.cpp | ||
| D3DState.h | ||
| D3DStreamBuffer.cpp | ||
| D3DStreamBuffer.h | ||
| D3DTexture.cpp | ||
| D3DTexture.h | ||
| D3DUtil.cpp | ||
| D3DUtil.h | ||
| FramebufferManager.cpp | ||
| FramebufferManager.h | ||
| main.cpp | ||
| NativeVertexFormat.cpp | ||
| NativeVertexFormat.h | ||
| PerfQuery.cpp | ||
| PerfQuery.h | ||
| PSTextureEncoder.cpp | ||
| PSTextureEncoder.h | ||
| Render.cpp | ||
| Render.h | ||
| ShaderCache.cpp | ||
| ShaderCache.h | ||
| ShaderConstantsManager.cpp | ||
| ShaderConstantsManager.h | ||
| StaticShaderCache.cpp | ||
| StaticShaderCache.h | ||
| TextureCache.cpp | ||
| TextureCache.h | ||
| TextureEncoder.h | ||
| VertexManager.cpp | ||
| VertexManager.h | ||
| VideoBackend.h | ||
| XFBEncoder.cpp | ||
| XFBEncoder.h | ||