ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp
and once by HWLightingModelRenderer.cpp. Having both in the global
namespace is a violation of the C++ One-Definition-Rule.
Move both definitions into their "parent" classes.
Differential D2932
Fix ODR violation for ShaderModelRendererInternals StefanBruens on Aug 4 2020, 8:44 PM. Authored by
Details ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp Move both definitions into their "parent" classes. Building with LTO enabled finishes without warnings
Diff Detail
Event TimelineComment Actions Hey thanks for the patch Can you add context to the patch? e.g. Or if you use arcanist see Comment Actions Upload with context. I can actually compile with LTO anyways on clang, but this seems correct to me and it works. Comment Actions Indeed, there is the violation of ODR. The patch seems legit. You need to add yourself in credits: binaries/data/mods/public/gui/credits/texts/programming.json if you're not there yet.
Comment Actions @StefanBruens Let me know if the credits are OK for you or if you want to appear differently. I'll commit then. Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Project wide: **** CPPCheckBear (syntaxError) [Section: Source | Severity: MAJOR] **** ! ! Code 'classShaderModelVertexRenderer:' is invalid C code. Use --std or --language to configure the language. Project wide: **** CPPCheckBear (syntaxError) [Section: Source | Severity: MAJOR] **** ! ! Code 'classCModelRData:' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2907/display/redirect
Comment Actions Successful build - Chance fights ever on the side of the prudent. Linter detected issues: Executing section Source... Project wide: **** CPPCheckBear (syntaxError) [Section: Source | Severity: MAJOR] **** ! ! Code 'classShaderModelVertexRenderer:' is invalid C code. Use --std or --language to configure the language. Project wide: **** CPPCheckBear (syntaxError) [Section: Source | Severity: MAJOR] **** ! ! Code 'classCModelRData:' is invalid C code. Use --std or --language to configure the language. Executing section JS... Executing section cli... Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2913/display/redirect |