mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-24 17:09:06 +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.
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| FramebufferManager.h | ||
| Null.vcxproj | ||
| NullBackend.cpp | ||
| PerfQuery.h | ||
| Render.cpp | ||
| Render.h | ||
| ShaderCache.cpp | ||
| ShaderCache.h | ||
| TextureCache.h | ||
| VertexManager.cpp | ||
| VertexManager.h | ||
| VideoBackend.h | ||