mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-23 06:57:08 +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.
|
||
|---|---|---|
| .. | ||
| Clipper.cpp | ||
| Clipper.h | ||
| CMakeLists.txt | ||
| DebugUtil.cpp | ||
| DebugUtil.h | ||
| EfbCopy.cpp | ||
| EfbCopy.h | ||
| EfbInterface.cpp | ||
| EfbInterface.h | ||
| NativeVertexFormat.h | ||
| Rasterizer.cpp | ||
| Rasterizer.h | ||
| SetupUnit.cpp | ||
| SetupUnit.h | ||
| Software.vcxproj | ||
| SWmain.cpp | ||
| SWOGLWindow.cpp | ||
| SWOGLWindow.h | ||
| SWRenderer.cpp | ||
| SWRenderer.h | ||
| SWVertexLoader.cpp | ||
| SWVertexLoader.h | ||
| Tev.cpp | ||
| Tev.h | ||
| TextureEncoder.cpp | ||
| TextureEncoder.h | ||
| TextureSampler.cpp | ||
| TextureSampler.h | ||
| TransformUnit.cpp | ||
| TransformUnit.h | ||
| Vec3.h | ||
| VideoBackend.h | ||