From 5fd1ae84d5dd55458d4673937a177beca8c9001f Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Tue, 28 Apr 2026 18:37:25 -0400 Subject: [PATCH] document '{}' instead of '{0}' for zero initialization --- AGENTS.md | 2 +- tests/test_true_anomaly_roundtrip.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9533086..f6c8359 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,7 +21,7 @@ - No trailing whitespace in any files (including markdown) - Pre-commit hook automatically strips it - For markdown line breaks, use
tag instead of two trailing spaces -- ZII (Zero Is Initialization) pattern: Initialize structs using `= {0}` or `= {NULL}` instead of individual field assignments. This guarantees all fields (including padding) are zeroed out. Example: `MyStruct s = {0};` +- ZII (Zero Is Initialization) pattern: Initialize structs using `type_name s = {};` ## File Reading Policy - Ask before reading files unless immediately necessary for current task diff --git a/tests/test_true_anomaly_roundtrip.cpp b/tests/test_true_anomaly_roundtrip.cpp index 29b25c0..693bf61 100644 --- a/tests/test_true_anomaly_roundtrip.cpp +++ b/tests/test_true_anomaly_roundtrip.cpp @@ -11,7 +11,7 @@ SCENARIO("True anomaly round-trip conversion and radius sanity checks", const double parent_mass = 5.972e24; const double a = 7000e3; const double e = 0.3; - OrbitalElements elements = {0}; + OrbitalElements elements = {}; elements.semi_major_axis = a; elements.eccentricity = e; Vec3 pos, vel;