You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,7 @@ Keep original types at API boundaries (Win32, DirectX, CRT); `void*` can remain.
157
157
158
158
-**Every type must be corroborated by matched code.** A type is proven only when a `// FUNCTION:` using it reaches 100%. Until then, `undefined`/`undefined4`.
159
159
-**No raw pointer arithmetic as a substitute for types.** Casts + subtractions mean the types are wrong; find the real class so the cast is legitimate C++ (including multi-inheritance cross-casts — define the inheritance, don't fake the adjustment).
160
+
-**Split mixed compilation units until unexplained address gaps are gone.** A large non-FOLDED address jump usually means one of the functions is assigned to the wrong class/type, or that multiple whole classes have been mashed into one source unit. Fix this by correcting ownership and moving whole classes or cohesive groups of whole classes into address-local implementation units. The exceptions are intentional FOLDED functions, which stay with the class they logically belong to, and single classes whose methods genuinely span a wide address range; never split one class's methods across `.cpp` files just to make address order look cleaner.
160
161
-**One root type per header.** A header should define at most one top-level class or struct; forward declarations do not count. If a second concrete root type is needed, move it to its own header and include that header.
161
162
-**Nest one-owner helper types.** Loader params, callback shims, small related records, and similar one-owner types belong inside the primary class that owns or consumes them instead of becoming top-level classes/structs.
162
163
-**Ground polymorphic classes.** When a concrete polymorphic class is identified, add its `VTABLE`, ctor, dtor, and scalar-deleting-destructor annotations instead of leaving it as an unannotated interface shape.
0 commit comments