From 7455c3d0bda6ab60d3f67fafd0ce04428143bcbe Mon Sep 17 00:00:00 2001 From: Mubashshir Date: Sat, 28 Oct 2023 20:05:49 +0600 Subject: Use better names for reference helpers Signed-off-by: Mubashshir --- src/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9edf6a6..a42b5a6 100644 --- a/src/main.c +++ b/src/main.c @@ -5,9 +5,10 @@ #include "teams.h" #include "common.h" -// ref(type) references content is always const -// mut(type) references content is mutable -void process(const ref(char) line, unsigned idx, team obj) +// ref(type) -> const ref to const data +// mut(type) -> const ref to mut data +// ptr(type) -> mut ref to mut data +void process(ref(char) line, unsigned idx, team obj) { unsigned s; switch(idx) { @@ -35,7 +36,7 @@ int main() { unsigned num = 0, i = 0; char line[255] = ""; - team *teams; + ptr(team) teams; getline(line, 255, stdin); consume(line, 255, sscanf, "%u", &num); -- cgit v1.2.3