Add Helpful Comments#87
Conversation
Add comment to clarify that DateTime->Value is not seconds since the epoch. Add comments clarifying confusing details in the DateTime structure. Add comment to explain what the qpf_grow_fn_t() type is, used by qprintf.
Greptile SummaryThis PR adds clarifying comments to two header files — Confidence Score: 5/5Pure documentation/comment additions with no logic changes; safe to merge. All added comments were verified against codebase usage sites (tm_year assignment, +1900 display adjustment, 0-based month storage, grow_fn call sites). No logic is modified, so there is no risk of runtime regression. No files require special attention.
|
| Filename | Overview |
|---|---|
| centrallix-lib/include/datatypes.h | Adds 0-based/1900-based annotations to all DateTime.Part bitfields and a NOT seconds since the epoch! note on Value; copyright updated to 2026. All annotations verified correct against codebase usage. |
| centrallix-lib/include/qprintf.h | Adds a Doxygen-style block comment documenting qpf_grow_fn_t parameter names and semantics; parameter names added to the typedef signature; copyright updated to 2026. Verified correct against implementation call sites. |
Class Diagram
%%{init: {'theme': 'neutral'}}%%
classDiagram
class DateTime {
<<union>>
+long long Value
}
class Part {
<<struct>>
+unsigned int Second : 6
+unsigned int Minute : 6
+unsigned int Hour : 5
+unsigned int Day : 5
+unsigned int Month : 4
+unsigned int Year : 12
}
note for Part "Second, Minute, Hour, Day, Month: 0-based\nMonth: 0=January, 1=February\nYear: 1900-based (102 = 2002)\nValue: NOT seconds since the epoch"
DateTime *-- Part : contains
Reviews (3): Last reviewed commit: "Update copywrite notice in modified file..." | Re-trigger Greptile
|
@greptileai Please re-review this PR and let me know if you have any other comments, or let me know if the PR is ready to merge. |
|
PR cleared for human review. |
Changes extracted from #85. Should not affect logic. Review should be very easy.