mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-14 08:30:29 +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 | ||
| CommandBufferManager.cpp | ||
| CommandBufferManager.h | ||
| Constants.h | ||
| FramebufferManager.cpp | ||
| FramebufferManager.h | ||
| main.cpp | ||
| ObjectCache.cpp | ||
| ObjectCache.h | ||
| PerfQuery.cpp | ||
| PerfQuery.h | ||
| RasterFont.cpp | ||
| RasterFont.h | ||
| Renderer.cpp | ||
| Renderer.h | ||
| ShaderCompiler.cpp | ||
| ShaderCompiler.h | ||
| StagingBuffer.cpp | ||
| StagingBuffer.h | ||
| StagingTexture2D.cpp | ||
| StagingTexture2D.h | ||
| StateTracker.cpp | ||
| StateTracker.h | ||
| StreamBuffer.cpp | ||
| StreamBuffer.h | ||
| SwapChain.cpp | ||
| SwapChain.h | ||
| Texture2D.cpp | ||
| Texture2D.h | ||
| TextureCache.cpp | ||
| TextureCache.h | ||
| TextureConverter.cpp | ||
| TextureConverter.h | ||
| Util.cpp | ||
| Util.h | ||
| VertexFormat.cpp | ||
| VertexFormat.h | ||
| VertexManager.cpp | ||
| VertexManager.h | ||
| VideoBackend.h | ||
| Vulkan.vcxproj | ||
| VulkanContext.cpp | ||
| VulkanContext.h | ||
| VulkanEntryPoints.inl | ||
| VulkanLoader.cpp | ||
| VulkanLoader.h | ||