build: complete the IWYU tail — APawn in VoxelWorld.cpp
VoxelWorld.cpp:526 dereferences the pawn, so APawn must be complete; Casts.h only forward-declares it. Adds GameFramework/Pawn.h, and PlayerController.h which was complete transitively only — the same fragility this change removes. My earlier scan covered Public/ only. The shared PCH served .cpp files too, and APawn was named in Build.cs's own error list. Everything else in the module compiled, so this is the entire tail. UNVERIFIED: not compiled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1190,3 +1190,20 @@ exact-lattice `ClassifyTile` bound must both survive the port. `§C1` (bounded s
|
|||||||
open and still wants doing before too many more archetypes copy it.
|
open and still wants doing before too many more archetypes copy it.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 2026-07-27 — the IWYU tail was exactly one site.
|
||||||
|
|
||||||
|
`VoxelWorld.cpp:526` — `PC->GetPawn()->GetActorLocation()` needs **`APawn` complete**, and `Casts.h`
|
||||||
|
only forward-declares it. Added `GameFramework/Pawn.h`, plus `GameFramework/PlayerController.h`
|
||||||
|
which was only complete *transitively* — the same fragility this whole change exists to remove.
|
||||||
|
|
||||||
|
**My scan missed it because I only audited `Public/`.** The shared PCH served `.cpp` files too, and
|
||||||
|
`APawn` was named in `Build.cs`'s original error list — I read that list and still scanned only the
|
||||||
|
headers. Everything else in the module compiled, so this is the whole tail: one site, one build.
|
||||||
|
|
||||||
|
**UNVERIFIED:** the fix.
|
||||||
|
|
||||||
|
**Next single action:** rebuild. Then watch the perf number — `/fp:precise` on a noise-heavy hot
|
||||||
|
path, checked against `ARCHITECTURE §8.10`. Then back to the opstack: `SurfaceWorld` (§5).
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
@@ -11,6 +11,14 @@
|
|||||||
#include "VoxelTerrainOpDefinition.h"
|
#include "VoxelTerrainOpDefinition.h"
|
||||||
#include "VoxelContentManager.h"
|
#include "VoxelContentManager.h"
|
||||||
#include "VoxelDensityVolume.h"
|
#include "VoxelDensityVolume.h"
|
||||||
|
// IWYU (FPSemantics = Precise ⇒ plus de PCH partagé) : GetPlayerPosition déréférence le pawn, donc
|
||||||
|
// APawn doit être COMPLET — `Casts.h` n'en donne qu'une déclaration avant. APlayerController était
|
||||||
|
// complet par transitivité seulement : on l'inclut explicitement, c'est exactement la fragilité
|
||||||
|
// qu'on est en train de retirer.
|
||||||
|
// GetPlayerPosition dereferences the pawn, so APawn must be COMPLETE — Casts.h only forward-declares
|
||||||
|
// it. APlayerController was complete transitively only; include it explicitly.
|
||||||
|
#include "GameFramework/Pawn.h"
|
||||||
|
#include "GameFramework/PlayerController.h"
|
||||||
#include "Materials/MaterialInstanceDynamic.h"
|
#include "Materials/MaterialInstanceDynamic.h"
|
||||||
#include "Materials/MaterialParameterCollection.h"
|
#include "Materials/MaterialParameterCollection.h"
|
||||||
#include "Kismet/KismetMaterialLibrary.h"
|
#include "Kismet/KismetMaterialLibrary.h"
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ public class VoxelForge : ModuleRules
|
|||||||
// it — never to revert FPSemantics, which is now load-bearing for cross-platform play.
|
// it — never to revert FPSemantics, which is now load-bearing for cross-platform play.
|
||||||
// Headers fixed on 2026-07-27: VoxelBiomeDefinition, VoxelSettings, VoxelStrateDefinition,
|
// Headers fixed on 2026-07-27: VoxelBiomeDefinition, VoxelSettings, VoxelStrateDefinition,
|
||||||
// VoxelStrateTypes, VoxelContentManager, VoxelAtmosphereManager, VoxelDensityVolume.
|
// VoxelStrateTypes, VoxelContentManager, VoxelAtmosphereManager, VoxelDensityVolume.
|
||||||
|
// Plus VoxelWorld.cpp (GameFramework/Pawn.h) — the .cpp files needed auditing too, not just
|
||||||
|
// the public headers. That was the whole residual tail: one site, found in one build.
|
||||||
// Expect a residual tail: the shared PCH hid these for years and only a build enumerates
|
// Expect a residual tail: the shared PCH hid these for years and only a build enumerates
|
||||||
// them all. VoxelDensityVolume's was the nasty one — ENABLE_DRAW_DEBUG is used in an #if,
|
// them all. VoxelDensityVolume's was the nasty one — ENABLE_DRAW_DEBUG is used in an #if,
|
||||||
// and an undefined macro there is silently 0 rather than an error.
|
// and an undefined macro there is silently 0 rather than an error.
|
||||||
|
|||||||
Reference in New Issue
Block a user